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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,300 |
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/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_delete.py
|
azext_providerhub.aaz.latest.providerhub.provider_registration._delete.Delete.ProviderRegistrationsDelete
|
class ProviderRegistrationsDelete(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class ProviderRegistrationsDelete(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 | 57 | 9 | 48 | 19 | 34 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
10,301 |
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/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_create.py
|
azext_providerhub.aaz.latest.providerhub.provider_registration._create.Create.ProviderRegistrationsCreateOrUpdate
|
class ProviderRegistrationsCreateOrUpdate(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-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("kind", AAZStrType, ".kind")
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"capabilities", AAZListType, ".capabilities")
properties.set_prop(
"crossTenantTokenValidation", AAZStrType, ".cross_tenant_token_validation")
properties.set_prop("customManifestVersion",
AAZStrType, ".custom_manifest_version")
properties.set_prop("dstsConfiguration",
AAZObjectType, ".dsts_configuration")
properties.set_prop("enableTenantLinkedNotification", AAZBoolType,
".enable_tenant_linked_notification", typ_kwargs={"nullable": True})
properties.set_prop("featuresRule", AAZObjectType)
properties.set_prop(
"globalNotificationEndpoints", AAZListType, ".global_notification_endpoints")
properties.set_prop("legacyNamespace",
AAZStrType, ".legacy_namespace")
properties.set_prop("legacyRegistrations",
AAZListType, ".legacy_registrations")
properties.set_prop("linkedNotificationRules",
AAZListType, ".linked_notification_rules")
properties.set_prop("management", AAZObjectType)
properties.set_prop("managementGroupGlobalNotificationEndpoints",
AAZListType, ".management_group_global_notification_endpoints")
properties.set_prop(
"metadata", AAZFreeFormDictType, ".metadata")
properties.set_prop("namespace", AAZStrType, ".namespace")
properties.set_prop("notificationOptions",
AAZStrType, ".notification_options")
properties.set_prop("notificationSettings",
AAZObjectType, ".notification_settings")
properties.set_prop(
"notifications", AAZListType, ".notifications")
properties.set_prop("optionalFeatures",
AAZListType, ".optional_features")
properties.set_prop("privateResourceProviderConfiguration",
AAZObjectType, ".private_resource_provider_configuration")
properties.set_prop("providerAuthentication",
AAZObjectType, ".provider_authentication")
properties.set_prop("providerAuthorizations",
AAZListType, ".provider_authorizations")
properties.set_prop("providerHubMetadata",
AAZObjectType, ".provider_hub_metadata")
properties.set_prop(
"providerType", AAZStrType, ".provider_type")
properties.set_prop("providerVersion",
AAZStrType, ".provider_version")
properties.set_prop("requestHeaderOptions", AAZObjectType)
properties.set_prop("requiredFeatures",
AAZListType, ".required_features")
properties.set_prop("resourceGroupLockOptionDuringMove",
AAZObjectType, ".resource_group_lock_option_during_move")
properties.set_prop("resourceHydrationAccounts",
AAZListType, ".resource_hydration_accounts")
properties.set_prop("resourceProviderAuthorizationRules",
AAZObjectType, ".resource_provider_authorization_rules")
properties.set_prop("responseOptions",
AAZObjectType, ".response_options")
properties.set_prop("serviceName", AAZStrType, ".service_name")
properties.set_prop("services", AAZListType, ".services")
properties.set_prop(
"subscriptionLifecycleNotificationSpecifications", AAZObjectType)
properties.set_prop("templateDeploymentOptions",
AAZObjectType, ".template_deployment_options")
_CreateHelper._build_schema_token_auth_configuration_create(properties.set_prop(
"tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration"))
capabilities = _builder.get(".properties.capabilities")
if capabilities is not None:
capabilities.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.capabilities[]")
if _elements is not None:
_elements.set_prop("effect", AAZStrType, ".effect", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("quotaId", AAZStrType, ".quota_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("requiredFeatures",
AAZListType, ".required_features")
required_features = _builder.get(
".properties.capabilities[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
dsts_configuration = _builder.get(".properties.dstsConfiguration")
if dsts_configuration is not None:
dsts_configuration.set_prop(
"serviceDnsName", AAZStrType, ".service_dns_name")
dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={
"flags": {"required": True}})
features_rule = _builder.get(".properties.featuresRule")
if features_rule is not None:
features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={
"flags": {"required": True}})
global_notification_endpoints = _builder.get(
".properties.globalNotificationEndpoints")
if global_notification_endpoints is not None:
_CreateHelper._build_schema_resource_provider_endpoint_create(
global_notification_endpoints.set_elements(AAZObjectType, "."))
legacy_registrations = _builder.get(
".properties.legacyRegistrations")
if legacy_registrations is not None:
legacy_registrations.set_elements(AAZStrType, ".")
linked_notification_rules = _builder.get(
".properties.linkedNotificationRules")
if linked_notification_rules is not None:
linked_notification_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.linkedNotificationRules[]")
if _elements is not None:
_elements.set_prop("actions", AAZListType, ".actions")
_elements.set_prop("dstsConfiguration",
AAZObjectType, ".dsts_configuration")
_elements.set_prop("endpoints", AAZListType, ".endpoints")
_CreateHelper._build_schema_token_auth_configuration_create(_elements.set_prop(
"tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration"))
actions = _builder.get(
".properties.linkedNotificationRules[].actions")
if actions is not None:
actions.set_elements(AAZStrType, ".")
dsts_configuration = _builder.get(
".properties.linkedNotificationRules[].dstsConfiguration")
if dsts_configuration is not None:
dsts_configuration.set_prop(
"serviceDnsName", AAZStrType, ".service_dns_name")
dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={
"flags": {"required": True}})
endpoints = _builder.get(
".properties.linkedNotificationRules[].endpoints")
if endpoints is not None:
_CreateHelper._build_schema_resource_provider_endpoint_create(
endpoints.set_elements(AAZObjectType, "."))
management = _builder.get(".properties.management")
if management is not None:
management.set_prop("authorizationOwners",
AAZListType, ".authorization_owners")
management.set_prop("canaryManifestOwners",
AAZListType, ".canary_manifest_owners")
management.set_prop("errorResponseMessageOptions",
AAZObjectType, ".error_response_message_options")
management.set_prop("expeditedRolloutMetadata",
AAZObjectType, ".expedited_rollout_metadata")
management.set_prop(
"expeditedRolloutSubmitters", AAZListType, ".expedited_rollout_submitters")
management.set_prop("incidentContactEmail",
AAZStrType, ".incident_contact_email")
management.set_prop("incidentRoutingService",
AAZStrType, ".incident_routing_service")
management.set_prop("incidentRoutingTeam",
AAZStrType, ".incident_routing_team")
management.set_prop(
"manifestOwners", AAZListType, ".manifest_owners")
management.set_prop("pcCode", AAZStrType, ".pc_code")
management.set_prop("profitCenterProgramId",
AAZStrType, ".profit_center_program_id")
management.set_prop("resourceAccessPolicy",
AAZStrType, ".resource_access_policy")
management.set_prop("resourceAccessRoles",
AAZListType, ".resource_access_roles")
management.set_prop(
"schemaOwners", AAZListType, ".schema_owners")
management.set_prop("serviceTreeInfos",
AAZListType, ".service_tree_infos")
authorization_owners = _builder.get(
".properties.management.authorizationOwners")
if authorization_owners is not None:
authorization_owners.set_elements(AAZStrType, ".")
canary_manifest_owners = _builder.get(
".properties.management.canaryManifestOwners")
if canary_manifest_owners is not None:
canary_manifest_owners.set_elements(AAZStrType, ".")
error_response_message_options = _builder.get(
".properties.management.errorResponseMessageOptions")
if error_response_message_options is not None:
error_response_message_options.set_prop(
"serverFailureResponseMessageType", AAZStrType, ".server_failure_response_message_type")
expedited_rollout_metadata = _builder.get(
".properties.management.expeditedRolloutMetadata")
if expedited_rollout_metadata is not None:
expedited_rollout_metadata.set_prop(
"enabled", AAZBoolType, ".enabled")
expedited_rollout_metadata.set_prop(
"expeditedRolloutIntent", AAZStrType, ".expedited_rollout_intent")
expedited_rollout_submitters = _builder.get(
".properties.management.expeditedRolloutSubmitters")
if expedited_rollout_submitters is not None:
expedited_rollout_submitters.set_elements(AAZStrType, ".")
manifest_owners = _builder.get(
".properties.management.manifestOwners")
if manifest_owners is not None:
manifest_owners.set_elements(AAZStrType, ".")
resource_access_roles = _builder.get(
".properties.management.resourceAccessRoles")
if resource_access_roles is not None:
resource_access_roles.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.management.resourceAccessRoles[]")
if _elements is not None:
_elements.set_prop("actions", AAZListType, ".actions")
_elements.set_prop("allowedGroupClaims",
AAZListType, ".allowed_group_claims")
actions = _builder.get(
".properties.management.resourceAccessRoles[].actions")
if actions is not None:
actions.set_elements(AAZStrType, ".")
allowed_group_claims = _builder.get(
".properties.management.resourceAccessRoles[].allowedGroupClaims")
if allowed_group_claims is not None:
allowed_group_claims.set_elements(AAZStrType, ".")
schema_owners = _builder.get(".properties.management.schemaOwners")
if schema_owners is not None:
schema_owners.set_elements(AAZStrType, ".")
service_tree_infos = _builder.get(
".properties.management.serviceTreeInfos")
if service_tree_infos is not None:
service_tree_infos.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.management.serviceTreeInfos[]")
if _elements is not None:
_elements.set_prop("componentId", AAZStrType, ".component_id")
_elements.set_prop("readiness", AAZStrType, ".readiness")
_elements.set_prop("serviceId", AAZStrType, ".service_id")
management_group_global_notification_endpoints = _builder.get(
".properties.managementGroupGlobalNotificationEndpoints")
if management_group_global_notification_endpoints is not None:
_CreateHelper._build_schema_resource_provider_endpoint_create(
management_group_global_notification_endpoints.set_elements(AAZObjectType, "."))
metadata = _builder.get(".properties.metadata")
if metadata is not None:
metadata.set_anytype_elements(".")
notification_settings = _builder.get(
".properties.notificationSettings")
if notification_settings is not None:
notification_settings.set_prop(
"subscriberSettings", AAZListType, ".subscriber_settings")
subscriber_settings = _builder.get(
".properties.notificationSettings.subscriberSettings")
if subscriber_settings is not None:
subscriber_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.notificationSettings.subscriberSettings[]")
if _elements is not None:
_elements.set_prop("filterRules", AAZListType, ".filter_rules")
filter_rules = _builder.get(
".properties.notificationSettings.subscriberSettings[].filterRules")
if filter_rules is not None:
filter_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.notificationSettings.subscriberSettings[].filterRules[]")
if _elements is not None:
_elements.set_prop("endpointInformation",
AAZListType, ".endpoint_information")
_elements.set_prop("filterQuery", AAZStrType, ".filter_query")
endpoint_information = _builder.get(
".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation")
if endpoint_information is not None:
endpoint_information.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation[]")
if _elements is not None:
_elements.set_prop("endpoint", AAZStrType, ".endpoint")
_elements.set_prop(
"endpointType", AAZStrType, ".endpoint_type")
_elements.set_prop(
"schemaVersion", AAZStrType, ".schema_version")
notifications = _builder.get(".properties.notifications")
if notifications is not None:
notifications.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.notifications[]")
if _elements is not None:
_elements.set_prop("notificationType",
AAZStrType, ".notification_type")
_elements.set_prop("skipNotifications",
AAZStrType, ".skip_notifications")
optional_features = _builder.get(".properties.optionalFeatures")
if optional_features is not None:
optional_features.set_elements(AAZStrType, ".")
private_resource_provider_configuration = _builder.get(
".properties.privateResourceProviderConfiguration")
if private_resource_provider_configuration is not None:
private_resource_provider_configuration.set_prop(
"allowedSubscriptions", AAZListType, ".allowed_subscriptions")
allowed_subscriptions = _builder.get(
".properties.privateResourceProviderConfiguration.allowedSubscriptions")
if allowed_subscriptions is not None:
allowed_subscriptions.set_elements(AAZStrType, ".")
provider_authentication = _builder.get(
".properties.providerAuthentication")
if provider_authentication is not None:
provider_authentication.set_prop(
"allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}})
allowed_audiences = _builder.get(
".properties.providerAuthentication.allowedAudiences")
if allowed_audiences is not None:
allowed_audiences.set_elements(AAZStrType, ".")
provider_authorizations = _builder.get(
".properties.providerAuthorizations")
if provider_authorizations is not None:
_CreateHelper._build_schema_resource_provider_authorization_create(
provider_authorizations.set_elements(AAZObjectType, "."))
provider_hub_metadata = _builder.get(
".properties.providerHubMetadata")
if provider_hub_metadata is not None:
provider_hub_metadata.set_prop(
"directRpRoleDefinitionId", AAZStrType, ".direct_rp_role_definition_id")
provider_hub_metadata.set_prop(
"globalAsyncOperationResourceTypeName", AAZStrType, ".global_async_operation_resource_type_name")
provider_hub_metadata.set_prop(
"providerAuthentication", AAZObjectType, ".providerhub_metadata_authentication")
provider_hub_metadata.set_prop(
"providerAuthorizations", AAZListType, ".providerhub_metadata_authorizations")
provider_hub_metadata.set_prop(
"regionalAsyncOperationResourceTypeName", AAZStrType, ".regional_async_operation_resource_type_name")
provider_hub_metadata.set_prop(
"thirdPartyProviderAuthorization", AAZObjectType)
provider_authentication = _builder.get(
".properties.providerHubMetadata.providerAuthentication")
if provider_authentication is not None:
provider_authentication.set_prop(
"allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}})
allowed_audiences = _builder.get(
".properties.providerHubMetadata.providerAuthentication.allowedAudiences")
if allowed_audiences is not None:
allowed_audiences.set_elements(AAZStrType, ".")
provider_authorizations = _builder.get(
".properties.providerHubMetadata.providerAuthorizations")
if provider_authorizations is not None:
_CreateHelper._build_schema_resource_provider_authorization_create(
provider_authorizations.set_elements(AAZObjectType, "."))
third_party_provider_authorization = _builder.get(
".properties.providerHubMetadata.thirdPartyProviderAuthorization")
if third_party_provider_authorization is not None:
third_party_provider_authorization.set_prop(
"authorizations", AAZListType, ".lighthouse_authorizations")
third_party_provider_authorization.set_prop(
"managedByTenantId", AAZStrType, ".managed_by_tenant_id")
authorizations = _builder.get(
".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations")
if authorizations is not None:
authorizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations[]")
if _elements is not None:
_elements.set_prop("principalId", AAZStrType, ".principal_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("roleDefinitionId", AAZStrType, ".role_definition_id", typ_kwargs={
"flags": {"required": True}})
request_header_options = _builder.get(
".properties.requestHeaderOptions")
if request_header_options is not None:
request_header_options.set_prop(
"optInHeaders", AAZStrType, ".opt_in_headers")
request_header_options.set_prop(
"optOutHeaders", AAZStrType, ".opt_out_headers")
required_features = _builder.get(".properties.requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
resource_group_lock_option_during_move = _builder.get(
".properties.resourceGroupLockOptionDuringMove")
if resource_group_lock_option_during_move is not None:
resource_group_lock_option_during_move.set_prop(
"blockActionVerb", AAZStrType, ".block_action_verb")
resource_hydration_accounts = _builder.get(
".properties.resourceHydrationAccounts")
if resource_hydration_accounts is not None:
resource_hydration_accounts.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.resourceHydrationAccounts[]")
if _elements is not None:
_elements.set_prop("accountName", AAZStrType, ".account_name")
_elements.set_prop(
"encryptedKey", AAZStrType, ".encrypted_key")
_elements.set_prop("maxChildResourceConsistencyJobLimit",
AAZIntType, ".max_child_resource_consistency_job_limit")
_elements.set_prop(
"subscriptionId", AAZStrType, ".subscription_id")
resource_provider_authorization_rules = _builder.get(
".properties.resourceProviderAuthorizationRules")
if resource_provider_authorization_rules is not None:
resource_provider_authorization_rules.set_prop(
"asyncOperationPollingRules", AAZObjectType, ".async_operation_polling_rules")
async_operation_polling_rules = _builder.get(
".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules")
if async_operation_polling_rules is not None:
async_operation_polling_rules.set_prop(
"additionalOptions", AAZStrType, ".additional_options")
async_operation_polling_rules.set_prop(
"authorizationActions", AAZListType, ".authorization_actions")
authorization_actions = _builder.get(
".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules.authorizationActions")
if authorization_actions is not None:
authorization_actions.set_elements(AAZStrType, ".")
response_options = _builder.get(".properties.responseOptions")
if response_options is not None:
response_options.set_prop(
"serviceClientOptionsType", AAZStrType, ".service_client_options_type")
services = _builder.get(".properties.services")
if services is not None:
services.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.services[]")
if _elements is not None:
_elements.set_prop("serviceName", AAZStrType, ".service_name")
_elements.set_prop("status", AAZStrType, ".status")
subscription_lifecycle_notification_specifications = _builder.get(
".properties.subscriptionLifecycleNotificationSpecifications")
if subscription_lifecycle_notification_specifications is not None:
subscription_lifecycle_notification_specifications.set_prop(
"softDeleteTTL", AAZStrType, ".soft_delete_ttl")
subscription_lifecycle_notification_specifications.set_prop(
"subscriptionStateOverrideActions", AAZListType, ".subscription_state_override_actions")
subscription_state_override_actions = _builder.get(
".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions")
if subscription_state_override_actions is not None:
subscription_state_override_actions.set_elements(
AAZObjectType, ".")
_elements = _builder.get(
".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions[]")
if _elements is not None:
_elements.set_prop("action", AAZStrType, ".action", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
template_deployment_options = _builder.get(
".properties.templateDeploymentOptions")
if template_deployment_options is not None:
template_deployment_options.set_prop(
"preflightOptions", AAZListType, ".preflight_options")
template_deployment_options.set_prop(
"preflightSupported", AAZBoolType, ".preflight_supported")
preflight_options = _builder.get(
".properties.templateDeploymentOptions.preflightOptions")
if preflight_options is not None:
preflight_options.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.kind = AAZStrType()
_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.capabilities = AAZListType()
properties.cross_tenant_token_validation = AAZStrType(
serialized_name="crossTenantTokenValidation",
)
properties.custom_manifest_version = AAZStrType(
serialized_name="customManifestVersion",
)
properties.dsts_configuration = AAZObjectType(
serialized_name="dstsConfiguration",
)
properties.enable_tenant_linked_notification = AAZBoolType(
serialized_name="enableTenantLinkedNotification",
nullable=True,
)
properties.features_rule = AAZObjectType(
serialized_name="featuresRule",
)
properties.global_notification_endpoints = AAZListType(
serialized_name="globalNotificationEndpoints",
)
properties.legacy_namespace = AAZStrType(
serialized_name="legacyNamespace",
)
properties.legacy_registrations = AAZListType(
serialized_name="legacyRegistrations",
)
properties.linked_notification_rules = AAZListType(
serialized_name="linkedNotificationRules",
)
properties.management = AAZObjectType()
properties.management_group_global_notification_endpoints = AAZListType(
serialized_name="managementGroupGlobalNotificationEndpoints",
)
properties.metadata = AAZFreeFormDictType()
properties.namespace = AAZStrType()
properties.notification_options = AAZStrType(
serialized_name="notificationOptions",
)
properties.notification_settings = AAZObjectType(
serialized_name="notificationSettings",
)
properties.notifications = AAZListType()
properties.optional_features = AAZListType(
serialized_name="optionalFeatures",
)
properties.private_resource_provider_configuration = AAZObjectType(
serialized_name="privateResourceProviderConfiguration",
)
properties.provider_authentication = AAZObjectType(
serialized_name="providerAuthentication",
)
properties.provider_authorizations = AAZListType(
serialized_name="providerAuthorizations",
)
properties.provider_hub_metadata = AAZObjectType(
serialized_name="providerHubMetadata",
)
properties.provider_type = AAZStrType(
serialized_name="providerType",
)
properties.provider_version = AAZStrType(
serialized_name="providerVersion",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.request_header_options = AAZObjectType(
serialized_name="requestHeaderOptions",
)
properties.required_features = AAZListType(
serialized_name="requiredFeatures",
)
properties.resource_group_lock_option_during_move = AAZObjectType(
serialized_name="resourceGroupLockOptionDuringMove",
)
properties.resource_hydration_accounts = AAZListType(
serialized_name="resourceHydrationAccounts",
)
properties.resource_provider_authorization_rules = AAZObjectType(
serialized_name="resourceProviderAuthorizationRules",
)
properties.response_options = AAZObjectType(
serialized_name="responseOptions",
)
properties.service_name = AAZStrType(
serialized_name="serviceName",
)
properties.services = AAZListType()
properties.subscription_lifecycle_notification_specifications = AAZObjectType(
serialized_name="subscriptionLifecycleNotificationSpecifications",
)
properties.template_deployment_options = AAZObjectType(
serialized_name="templateDeploymentOptions",
)
properties.token_auth_configuration = AAZObjectType(
serialized_name="tokenAuthConfiguration",
)
_CreateHelper._build_schema_token_auth_configuration_read(
properties.token_auth_configuration)
capabilities = cls._schema_on_200_201.properties.capabilities
capabilities.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.capabilities.Element
_element.effect = AAZStrType(
flags={"required": True},
)
_element.quota_id = AAZStrType(
serialized_name="quotaId",
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
required_features = cls._schema_on_200_201.properties.capabilities.Element.required_features
required_features.Element = AAZStrType()
dsts_configuration = cls._schema_on_200_201.properties.dsts_configuration
dsts_configuration.service_dns_name = AAZStrType(
serialized_name="serviceDnsName",
)
dsts_configuration.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)
features_rule = cls._schema_on_200_201.properties.features_rule
features_rule.required_features_policy = AAZStrType(
serialized_name="requiredFeaturesPolicy",
flags={"required": True},
)
global_notification_endpoints = cls._schema_on_200_201.properties.global_notification_endpoints
global_notification_endpoints.Element = AAZObjectType()
_CreateHelper._build_schema_resource_provider_endpoint_read(
global_notification_endpoints.Element)
legacy_registrations = cls._schema_on_200_201.properties.legacy_registrations
legacy_registrations.Element = AAZStrType()
linked_notification_rules = cls._schema_on_200_201.properties.linked_notification_rules
linked_notification_rules.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.linked_notification_rules.Element
_element.actions = AAZListType()
_element.dsts_configuration = AAZObjectType(
serialized_name="dstsConfiguration",
)
_element.endpoints = AAZListType()
_element.token_auth_configuration = AAZObjectType(
serialized_name="tokenAuthConfiguration",
)
_CreateHelper._build_schema_token_auth_configuration_read(
_element.token_auth_configuration)
actions = cls._schema_on_200_201.properties.linked_notification_rules.Element.actions
actions.Element = AAZStrType()
dsts_configuration = cls._schema_on_200_201.properties.linked_notification_rules.Element.dsts_configuration
dsts_configuration.service_dns_name = AAZStrType(
serialized_name="serviceDnsName",
)
dsts_configuration.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)
endpoints = cls._schema_on_200_201.properties.linked_notification_rules.Element.endpoints
endpoints.Element = AAZObjectType()
_CreateHelper._build_schema_resource_provider_endpoint_read(
endpoints.Element)
management = cls._schema_on_200_201.properties.management
management.authorization_owners = AAZListType(
serialized_name="authorizationOwners",
)
management.canary_manifest_owners = AAZListType(
serialized_name="canaryManifestOwners",
)
management.error_response_message_options = AAZObjectType(
serialized_name="errorResponseMessageOptions",
)
management.expedited_rollout_metadata = AAZObjectType(
serialized_name="expeditedRolloutMetadata",
)
management.expedited_rollout_submitters = AAZListType(
serialized_name="expeditedRolloutSubmitters",
)
management.incident_contact_email = AAZStrType(
serialized_name="incidentContactEmail",
)
management.incident_routing_service = AAZStrType(
serialized_name="incidentRoutingService",
)
management.incident_routing_team = AAZStrType(
serialized_name="incidentRoutingTeam",
)
management.manifest_owners = AAZListType(
serialized_name="manifestOwners",
)
management.pc_code = AAZStrType(
serialized_name="pcCode",
)
management.profit_center_program_id = AAZStrType(
serialized_name="profitCenterProgramId",
)
management.resource_access_policy = AAZStrType(
serialized_name="resourceAccessPolicy",
)
management.resource_access_roles = AAZListType(
serialized_name="resourceAccessRoles",
)
management.schema_owners = AAZListType(
serialized_name="schemaOwners",
)
management.service_tree_infos = AAZListType(
serialized_name="serviceTreeInfos",
)
authorization_owners = cls._schema_on_200_201.properties.management.authorization_owners
authorization_owners.Element = AAZStrType()
canary_manifest_owners = cls._schema_on_200_201.properties.management.canary_manifest_owners
canary_manifest_owners.Element = AAZStrType()
error_response_message_options = cls._schema_on_200_201.properties.management.error_response_message_options
error_response_message_options.server_failure_response_message_type = AAZStrType(
serialized_name="serverFailureResponseMessageType",
)
expedited_rollout_metadata = cls._schema_on_200_201.properties.management.expedited_rollout_metadata
expedited_rollout_metadata.enabled = AAZBoolType()
expedited_rollout_metadata.expedited_rollout_intent = AAZStrType(
serialized_name="expeditedRolloutIntent",
)
expedited_rollout_submitters = cls._schema_on_200_201.properties.management.expedited_rollout_submitters
expedited_rollout_submitters.Element = AAZStrType()
manifest_owners = cls._schema_on_200_201.properties.management.manifest_owners
manifest_owners.Element = AAZStrType()
resource_access_roles = cls._schema_on_200_201.properties.management.resource_access_roles
resource_access_roles.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.management.resource_access_roles.Element
_element.actions = AAZListType()
_element.allowed_group_claims = AAZListType(
serialized_name="allowedGroupClaims",
)
actions = cls._schema_on_200_201.properties.management.resource_access_roles.Element.actions
actions.Element = AAZStrType()
allowed_group_claims = cls._schema_on_200_201.properties.management.resource_access_roles.Element.allowed_group_claims
allowed_group_claims.Element = AAZStrType()
schema_owners = cls._schema_on_200_201.properties.management.schema_owners
schema_owners.Element = AAZStrType()
service_tree_infos = cls._schema_on_200_201.properties.management.service_tree_infos
service_tree_infos.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.management.service_tree_infos.Element
_element.component_id = AAZStrType(
serialized_name="componentId",
)
_element.readiness = AAZStrType()
_element.service_id = AAZStrType(
serialized_name="serviceId",
)
management_group_global_notification_endpoints = cls._schema_on_200_201.properties.management_group_global_notification_endpoints
management_group_global_notification_endpoints.Element = AAZObjectType()
_CreateHelper._build_schema_resource_provider_endpoint_read(
management_group_global_notification_endpoints.Element)
notification_settings = cls._schema_on_200_201.properties.notification_settings
notification_settings.subscriber_settings = AAZListType(
serialized_name="subscriberSettings",
)
subscriber_settings = cls._schema_on_200_201.properties.notification_settings.subscriber_settings
subscriber_settings.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.notification_settings.subscriber_settings.Element
_element.filter_rules = AAZListType(
serialized_name="filterRules",
)
filter_rules = cls._schema_on_200_201.properties.notification_settings.subscriber_settings.Element.filter_rules
filter_rules.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.notification_settings.subscriber_settings.Element.filter_rules.Element
_element.endpoint_information = AAZListType(
serialized_name="endpointInformation",
)
_element.filter_query = AAZStrType(
serialized_name="filterQuery",
)
endpoint_information = cls._schema_on_200_201.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information
endpoint_information.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information.Element
_element.endpoint = AAZStrType()
_element.endpoint_type = AAZStrType(
serialized_name="endpointType",
)
_element.schema_version = AAZStrType(
serialized_name="schemaVersion",
)
notifications = cls._schema_on_200_201.properties.notifications
notifications.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.notifications.Element
_element.notification_type = AAZStrType(
serialized_name="notificationType",
)
_element.skip_notifications = AAZStrType(
serialized_name="skipNotifications",
)
optional_features = cls._schema_on_200_201.properties.optional_features
optional_features.Element = AAZStrType()
private_resource_provider_configuration = cls._schema_on_200_201.properties.private_resource_provider_configuration
private_resource_provider_configuration.allowed_subscriptions = AAZListType(
serialized_name="allowedSubscriptions",
)
allowed_subscriptions = cls._schema_on_200_201.properties.private_resource_provider_configuration.allowed_subscriptions
allowed_subscriptions.Element = AAZStrType()
provider_authentication = cls._schema_on_200_201.properties.provider_authentication
provider_authentication.allowed_audiences = AAZListType(
serialized_name="allowedAudiences",
flags={"required": True},
)
allowed_audiences = cls._schema_on_200_201.properties.provider_authentication.allowed_audiences
allowed_audiences.Element = AAZStrType()
provider_authorizations = cls._schema_on_200_201.properties.provider_authorizations
provider_authorizations.Element = AAZObjectType()
_CreateHelper._build_schema_resource_provider_authorization_read(
provider_authorizations.Element)
provider_hub_metadata = cls._schema_on_200_201.properties.provider_hub_metadata
provider_hub_metadata.direct_rp_role_definition_id = AAZStrType(
serialized_name="directRpRoleDefinitionId",
)
provider_hub_metadata.global_async_operation_resource_type_name = AAZStrType(
serialized_name="globalAsyncOperationResourceTypeName",
)
provider_hub_metadata.provider_authentication = AAZObjectType(
serialized_name="providerAuthentication",
)
provider_hub_metadata.provider_authorizations = AAZListType(
serialized_name="providerAuthorizations",
)
provider_hub_metadata.regional_async_operation_resource_type_name = AAZStrType(
serialized_name="regionalAsyncOperationResourceTypeName",
)
provider_hub_metadata.third_party_provider_authorization = AAZObjectType(
serialized_name="thirdPartyProviderAuthorization",
)
provider_authentication = cls._schema_on_200_201.properties.provider_hub_metadata.provider_authentication
provider_authentication.allowed_audiences = AAZListType(
serialized_name="allowedAudiences",
flags={"required": True},
)
allowed_audiences = cls._schema_on_200_201.properties.provider_hub_metadata.provider_authentication.allowed_audiences
allowed_audiences.Element = AAZStrType()
provider_authorizations = cls._schema_on_200_201.properties.provider_hub_metadata.provider_authorizations
provider_authorizations.Element = AAZObjectType()
_CreateHelper._build_schema_resource_provider_authorization_read(
provider_authorizations.Element)
third_party_provider_authorization = cls._schema_on_200_201.properties.provider_hub_metadata.third_party_provider_authorization
third_party_provider_authorization.authorizations = AAZListType()
third_party_provider_authorization.managed_by_tenant_id = AAZStrType(
serialized_name="managedByTenantId",
)
authorizations = cls._schema_on_200_201.properties.provider_hub_metadata.third_party_provider_authorization.authorizations
authorizations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.provider_hub_metadata.third_party_provider_authorization.authorizations.Element
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"required": True},
)
_element.role_definition_id = AAZStrType(
serialized_name="roleDefinitionId",
flags={"required": True},
)
request_header_options = cls._schema_on_200_201.properties.request_header_options
request_header_options.opt_in_headers = AAZStrType(
serialized_name="optInHeaders",
)
request_header_options.opt_out_headers = AAZStrType(
serialized_name="optOutHeaders",
)
required_features = cls._schema_on_200_201.properties.required_features
required_features.Element = AAZStrType()
resource_group_lock_option_during_move = cls._schema_on_200_201.properties.resource_group_lock_option_during_move
resource_group_lock_option_during_move.block_action_verb = AAZStrType(
serialized_name="blockActionVerb",
)
resource_hydration_accounts = cls._schema_on_200_201.properties.resource_hydration_accounts
resource_hydration_accounts.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.resource_hydration_accounts.Element
_element.account_name = AAZStrType(
serialized_name="accountName",
)
_element.encrypted_key = AAZStrType(
serialized_name="encryptedKey",
)
_element.max_child_resource_consistency_job_limit = AAZIntType(
serialized_name="maxChildResourceConsistencyJobLimit",
)
_element.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
resource_provider_authorization_rules = cls._schema_on_200_201.properties.resource_provider_authorization_rules
resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType(
serialized_name="asyncOperationPollingRules",
)
async_operation_polling_rules = cls._schema_on_200_201.properties.resource_provider_authorization_rules.async_operation_polling_rules
async_operation_polling_rules.additional_options = AAZStrType(
serialized_name="additionalOptions",
)
async_operation_polling_rules.authorization_actions = AAZListType(
serialized_name="authorizationActions",
)
authorization_actions = cls._schema_on_200_201.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions
authorization_actions.Element = AAZStrType()
response_options = cls._schema_on_200_201.properties.response_options
response_options.service_client_options_type = AAZStrType(
serialized_name="serviceClientOptionsType",
)
services = cls._schema_on_200_201.properties.services
services.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.services.Element
_element.service_name = AAZStrType(
serialized_name="serviceName",
)
_element.status = AAZStrType()
subscription_lifecycle_notification_specifications = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications
subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType(
serialized_name="softDeleteTTL",
)
subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType(
serialized_name="subscriptionStateOverrideActions",
)
subscription_state_override_actions = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions
subscription_state_override_actions.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType(
flags={"required": True},
)
template_deployment_options = cls._schema_on_200_201.properties.template_deployment_options
template_deployment_options.preflight_options = AAZListType(
serialized_name="preflightOptions",
)
template_deployment_options.preflight_supported = AAZBoolType(
serialized_name="preflightSupported",
)
preflight_options = cls._schema_on_200_201.properties.template_deployment_options.preflight_options
preflight_options.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 ProviderRegistrationsCreateOrUpdate(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 | 96 | 14 | 82 | 0 | 8 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 983 | 150 | 833 | 130 | 814 | 0 | 552 | 121 | 541 | 68 | 1 | 1 | 80 |
10,302 |
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/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_wait.py
|
azext_providerhub.aaz.latest.providerhub.resource_type_registration._wait.Wait.ResourceTypeRegistrationsGet
|
class ResourceTypeRegistrationsGet(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-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.kind = AAZStrType()
_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.add_resource_list_target_locations = AAZBoolType(
serialized_name="addResourceListTargetLocations",
)
properties.additional_options = AAZStrType(
serialized_name="additionalOptions",
)
properties.allow_empty_role_assignments = AAZBoolType(
serialized_name="allowEmptyRoleAssignments",
)
properties.allowed_resource_names = AAZListType(
serialized_name="allowedResourceNames",
)
properties.allowed_template_deployment_reference_actions = AAZListType(
serialized_name="allowedTemplateDeploymentReferenceActions",
)
properties.allowed_unauthorized_actions = AAZListType(
serialized_name="allowedUnauthorizedActions",
)
properties.api_profiles = AAZListType(
serialized_name="apiProfiles",
)
properties.async_operation_resource_type_name = AAZStrType(
serialized_name="asyncOperationResourceTypeName",
)
properties.async_timeout_rules = AAZListType(
serialized_name="asyncTimeoutRules",
)
properties.authorization_action_mappings = AAZListType(
serialized_name="authorizationActionMappings",
)
properties.availability_zone_rule = AAZObjectType(
serialized_name="availabilityZoneRule",
)
properties.capacity_rule = AAZObjectType(
serialized_name="capacityRule",
)
properties.category = AAZStrType()
properties.check_name_availability_specifications = AAZObjectType(
serialized_name="checkNameAvailabilitySpecifications",
)
properties.common_api_versions = AAZListType(
serialized_name="commonApiVersions",
)
properties.cross_tenant_token_validation = AAZStrType(
serialized_name="crossTenantTokenValidation",
)
properties.default_api_version = AAZStrType(
serialized_name="defaultApiVersion",
)
properties.disallowed_action_verbs = AAZListType(
serialized_name="disallowedActionVerbs",
)
properties.disallowed_end_user_operations = AAZListType(
serialized_name="disallowedEndUserOperations",
)
properties.dsts_configuration = AAZObjectType(
serialized_name="dstsConfiguration",
)
properties.enable_async_operation = AAZBoolType(
serialized_name="enableAsyncOperation",
)
properties.enable_third_party_s2_s = AAZBoolType(
serialized_name="enableThirdPartyS2S",
)
properties.endpoints = AAZListType()
properties.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
properties.extension_options = AAZObjectType(
serialized_name="extensionOptions",
)
properties.features_rule = AAZObjectType(
serialized_name="featuresRule",
)
properties.frontdoor_request_mode = AAZStrType(
serialized_name="frontdoorRequestMode",
)
properties.grouping_tag = AAZStrType(
serialized_name="groupingTag",
)
properties.identity_management = AAZObjectType(
serialized_name="identityManagement",
)
properties.is_pure_proxy = AAZBoolType(
serialized_name="isPureProxy",
)
properties.legacy_name = AAZStrType(
serialized_name="legacyName",
)
properties.legacy_names = AAZListType(
serialized_name="legacyNames",
)
properties.legacy_policy = AAZObjectType(
serialized_name="legacyPolicy",
)
properties.linked_access_checks = AAZListType(
serialized_name="linkedAccessChecks",
)
properties.linked_notification_rules = AAZListType(
serialized_name="linkedNotificationRules",
)
properties.linked_operation_rules = AAZListType(
serialized_name="linkedOperationRules",
)
properties.logging_rules = AAZListType(
serialized_name="loggingRules",
)
properties.managed_resource_group_configuration = AAZObjectType(
serialized_name="managedResourceGroupConfiguration",
)
properties.management = AAZObjectType()
properties.manifest_link = AAZStrType(
serialized_name="manifestLink",
)
properties.marketplace_options = AAZObjectType(
serialized_name="marketplaceOptions",
)
properties.marketplace_type = AAZStrType(
serialized_name="marketplaceType",
)
properties.metadata = AAZDictType()
properties.notifications = AAZListType()
properties.on_behalf_of_tokens = AAZObjectType(
serialized_name="onBehalfOfTokens",
)
properties.open_api_configuration = AAZObjectType(
serialized_name="openApiConfiguration",
)
properties.policy_execution_type = AAZStrType(
serialized_name="policyExecutionType",
)
properties.private_endpoint_configuration = AAZObjectType(
serialized_name="privateEndpointConfiguration",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.quota_rule = AAZObjectType(
serialized_name="quotaRule",
)
properties.regionality = AAZStrType()
properties.request_header_options = AAZObjectType(
serialized_name="requestHeaderOptions",
)
properties.required_features = AAZListType(
serialized_name="requiredFeatures",
)
properties.resource_cache = AAZObjectType(
serialized_name="resourceCache",
)
properties.resource_concurrency_control_options = AAZDictType(
serialized_name="resourceConcurrencyControlOptions",
)
properties.resource_deletion_policy = AAZStrType(
serialized_name="resourceDeletionPolicy",
)
properties.resource_graph_configuration = AAZObjectType(
serialized_name="resourceGraphConfiguration",
)
properties.resource_management_options = AAZObjectType(
serialized_name="resourceManagementOptions",
)
properties.resource_move_policy = AAZObjectType(
serialized_name="resourceMovePolicy",
)
properties.resource_provider_authorization_rules = AAZObjectType(
serialized_name="resourceProviderAuthorizationRules",
)
properties.resource_query_management = AAZObjectType(
serialized_name="resourceQueryManagement",
)
properties.resource_sub_type = AAZStrType(
serialized_name="resourceSubType",
)
properties.resource_type_common_attribute_management = AAZObjectType(
serialized_name="resourceTypeCommonAttributeManagement",
)
properties.resource_validation = AAZStrType(
serialized_name="resourceValidation",
)
properties.routing_rule = AAZObjectType(
serialized_name="routingRule",
)
properties.routing_type = AAZStrType(
serialized_name="routingType",
)
properties.service_tree_infos = AAZListType(
serialized_name="serviceTreeInfos",
)
properties.sku_link = AAZStrType(
serialized_name="skuLink",
)
properties.subscription_lifecycle_notification_specifications = AAZObjectType(
serialized_name="subscriptionLifecycleNotificationSpecifications",
)
properties.subscription_state_rules = AAZListType(
serialized_name="subscriptionStateRules",
)
properties.supports_tags = AAZBoolType(
serialized_name="supportsTags",
)
properties.swagger_specifications = AAZListType(
serialized_name="swaggerSpecifications",
)
properties.template_deployment_options = AAZObjectType(
serialized_name="templateDeploymentOptions",
)
properties.template_deployment_policy = AAZObjectType(
serialized_name="templateDeploymentPolicy",
)
properties.throttling_rules = AAZListType(
serialized_name="throttlingRules",
)
properties.token_auth_configuration = AAZObjectType(
serialized_name="tokenAuthConfiguration",
)
_WaitHelper._build_schema_token_auth_configuration_read(
properties.token_auth_configuration)
allowed_resource_names = cls._schema_on_200.properties.allowed_resource_names
allowed_resource_names.Element = AAZObjectType()
_element = cls._schema_on_200.properties.allowed_resource_names.Element
_element.get_action_verb = AAZStrType(
serialized_name="getActionVerb",
)
_element.name = AAZStrType()
allowed_template_deployment_reference_actions = cls._schema_on_200.properties.allowed_template_deployment_reference_actions
allowed_template_deployment_reference_actions.Element = AAZStrType()
allowed_unauthorized_actions = cls._schema_on_200.properties.allowed_unauthorized_actions
allowed_unauthorized_actions.Element = AAZStrType()
api_profiles = cls._schema_on_200.properties.api_profiles
api_profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.api_profiles.Element
_element.api_version = AAZStrType(
serialized_name="apiVersion",
)
_element.profile_version = AAZStrType(
serialized_name="profileVersion",
)
async_timeout_rules = cls._schema_on_200.properties.async_timeout_rules
async_timeout_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.async_timeout_rules.Element
_element.action_name = AAZStrType(
serialized_name="actionName",
)
_element.timeout = AAZStrType()
authorization_action_mappings = cls._schema_on_200.properties.authorization_action_mappings
authorization_action_mappings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.authorization_action_mappings.Element
_element.desired = AAZStrType()
_element.original = AAZStrType()
availability_zone_rule = cls._schema_on_200.properties.availability_zone_rule
availability_zone_rule.availability_zone_policy = AAZStrType(
serialized_name="availabilityZonePolicy",
)
capacity_rule = cls._schema_on_200.properties.capacity_rule
capacity_rule.capacity_policy = AAZStrType(
serialized_name="capacityPolicy",
)
capacity_rule.sku_alias = AAZStrType(
serialized_name="skuAlias",
)
check_name_availability_specifications = cls._schema_on_200.properties.check_name_availability_specifications
check_name_availability_specifications.enable_default_validation = AAZBoolType(
serialized_name="enableDefaultValidation",
)
check_name_availability_specifications.resource_types_with_custom_validation = AAZListType(
serialized_name="resourceTypesWithCustomValidation",
)
resource_types_with_custom_validation = cls._schema_on_200.properties.check_name_availability_specifications.resource_types_with_custom_validation
resource_types_with_custom_validation.Element = AAZStrType()
common_api_versions = cls._schema_on_200.properties.common_api_versions
common_api_versions.Element = AAZStrType()
disallowed_action_verbs = cls._schema_on_200.properties.disallowed_action_verbs
disallowed_action_verbs.Element = AAZStrType()
disallowed_end_user_operations = cls._schema_on_200.properties.disallowed_end_user_operations
disallowed_end_user_operations.Element = AAZStrType()
dsts_configuration = cls._schema_on_200.properties.dsts_configuration
dsts_configuration.service_dns_name = AAZStrType(
serialized_name="serviceDnsName",
)
dsts_configuration.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)
endpoints = cls._schema_on_200.properties.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.properties.endpoints.Element
_element.api_version = AAZStrType(
serialized_name="apiVersion",
)
_element.api_versions = AAZListType(
serialized_name="apiVersions",
)
_element.data_boundary = AAZStrType(
serialized_name="dataBoundary",
)
_element.dsts_configuration = AAZObjectType(
serialized_name="dstsConfiguration",
)
_element.enabled = AAZBoolType()
_element.endpoint_type = AAZStrType(
serialized_name="endpointType",
)
_element.endpoint_uri = AAZStrType(
serialized_name="endpointUri",
)
_element.extensions = AAZListType()
_element.features_rule = AAZObjectType(
serialized_name="featuresRule",
)
_element.kind = AAZStrType()
_element.locations = AAZListType()
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.sku_link = AAZStrType(
serialized_name="skuLink",
)
_element.timeout = AAZStrType()
_element.token_auth_configuration = AAZObjectType(
serialized_name="tokenAuthConfiguration",
)
_WaitHelper._build_schema_token_auth_configuration_read(
_element.token_auth_configuration)
_element.zones = AAZListType()
api_versions = cls._schema_on_200.properties.endpoints.Element.api_versions
api_versions.Element = AAZStrType()
dsts_configuration = cls._schema_on_200.properties.endpoints.Element.dsts_configuration
dsts_configuration.service_dns_name = AAZStrType(
serialized_name="serviceDnsName",
)
dsts_configuration.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)
extensions = cls._schema_on_200.properties.endpoints.Element.extensions
extensions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.endpoints.Element.extensions.Element
_element.endpoint_uri = AAZStrType(
serialized_name="endpointUri",
)
_element.extension_categories = AAZListType(
serialized_name="extensionCategories",
)
_element.timeout = AAZStrType()
extension_categories = cls._schema_on_200.properties.endpoints.Element.extensions.Element.extension_categories
extension_categories.Element = AAZStrType()
features_rule = cls._schema_on_200.properties.endpoints.Element.features_rule
features_rule.required_features_policy = AAZStrType(
serialized_name="requiredFeaturesPolicy",
flags={"required": True},
)
locations = cls._schema_on_200.properties.endpoints.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.endpoints.Element.required_features
required_features.Element = AAZStrType()
zones = cls._schema_on_200.properties.endpoints.Element.zones
zones.Element = AAZStrType()
extended_locations = cls._schema_on_200.properties.extended_locations
extended_locations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.extended_locations.Element
_element.supported_policy = AAZStrType(
serialized_name="supportedPolicy",
)
_element.type = AAZStrType()
extension_options = cls._schema_on_200.properties.extension_options
extension_options.resource_creation_begin = AAZObjectType(
serialized_name="resourceCreationBegin",
)
resource_creation_begin = cls._schema_on_200.properties.extension_options.resource_creation_begin
resource_creation_begin.request = AAZListType()
resource_creation_begin.response = AAZListType()
request = cls._schema_on_200.properties.extension_options.resource_creation_begin.request
request.Element = AAZStrType()
response = cls._schema_on_200.properties.extension_options.resource_creation_begin.response
response.Element = AAZStrType()
features_rule = cls._schema_on_200.properties.features_rule
features_rule.required_features_policy = AAZStrType(
serialized_name="requiredFeaturesPolicy",
flags={"required": True},
)
identity_management = cls._schema_on_200.properties.identity_management
identity_management.application_id = AAZStrType(
serialized_name="applicationId",
)
identity_management.application_ids = AAZListType(
serialized_name="applicationIds",
)
identity_management.delegation_app_ids = AAZListType(
serialized_name="delegationAppIds",
)
identity_management.type = AAZStrType()
application_ids = cls._schema_on_200.properties.identity_management.application_ids
application_ids.Element = AAZStrType()
delegation_app_ids = cls._schema_on_200.properties.identity_management.delegation_app_ids
delegation_app_ids.Element = AAZStrType()
legacy_names = cls._schema_on_200.properties.legacy_names
legacy_names.Element = AAZStrType()
legacy_policy = cls._schema_on_200.properties.legacy_policy
legacy_policy.disallowed_conditions = AAZListType(
serialized_name="disallowedConditions",
)
legacy_policy.disallowed_legacy_operations = AAZListType(
serialized_name="disallowedLegacyOperations",
)
disallowed_conditions = cls._schema_on_200.properties.legacy_policy.disallowed_conditions
disallowed_conditions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.legacy_policy.disallowed_conditions.Element
_element.disallowed_legacy_operations = AAZListType(
serialized_name="disallowedLegacyOperations",
)
_element.feature = AAZStrType()
disallowed_legacy_operations = cls._schema_on_200.properties.legacy_policy.disallowed_conditions.Element.disallowed_legacy_operations
disallowed_legacy_operations.Element = AAZStrType()
disallowed_legacy_operations = cls._schema_on_200.properties.legacy_policy.disallowed_legacy_operations
disallowed_legacy_operations.Element = AAZStrType()
linked_access_checks = cls._schema_on_200.properties.linked_access_checks
linked_access_checks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.linked_access_checks.Element
_element.action_name = AAZStrType(
serialized_name="actionName",
)
_element.linked_action = AAZStrType(
serialized_name="linkedAction",
)
_element.linked_action_verb = AAZStrType(
serialized_name="linkedActionVerb",
)
_element.linked_property = AAZStrType(
serialized_name="linkedProperty",
)
_element.linked_type = AAZStrType(
serialized_name="linkedType",
)
linked_notification_rules = cls._schema_on_200.properties.linked_notification_rules
linked_notification_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.linked_notification_rules.Element
_element.actions = AAZListType()
_element.actions_on_failed_operation = AAZListType(
serialized_name="actionsOnFailedOperation",
)
_element.fast_path_actions = AAZListType(
serialized_name="fastPathActions",
)
_element.fast_path_actions_on_failed_operation = AAZListType(
serialized_name="fastPathActionsOnFailedOperation",
)
_element.linked_notification_timeout = AAZStrType(
serialized_name="linkedNotificationTimeout",
)
actions = cls._schema_on_200.properties.linked_notification_rules.Element.actions
actions.Element = AAZStrType()
actions_on_failed_operation = cls._schema_on_200.properties.linked_notification_rules.Element.actions_on_failed_operation
actions_on_failed_operation.Element = AAZStrType()
fast_path_actions = cls._schema_on_200.properties.linked_notification_rules.Element.fast_path_actions
fast_path_actions.Element = AAZStrType()
fast_path_actions_on_failed_operation = cls._schema_on_200.properties.linked_notification_rules.Element.fast_path_actions_on_failed_operation
fast_path_actions_on_failed_operation.Element = AAZStrType()
linked_operation_rules = cls._schema_on_200.properties.linked_operation_rules
linked_operation_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.linked_operation_rules.Element
_element.depends_on_types = AAZListType(
serialized_name="dependsOnTypes",
)
_element.linked_action = AAZStrType(
serialized_name="linkedAction",
flags={"required": True},
)
_element.linked_operation = AAZStrType(
serialized_name="linkedOperation",
flags={"required": True},
)
depends_on_types = cls._schema_on_200.properties.linked_operation_rules.Element.depends_on_types
depends_on_types.Element = AAZStrType()
logging_rules = cls._schema_on_200.properties.logging_rules
logging_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.logging_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.detail_level = AAZStrType(
serialized_name="detailLevel",
flags={"required": True},
)
_element.direction = AAZStrType(
flags={"required": True},
)
_element.hidden_property_paths = AAZObjectType(
serialized_name="hiddenPropertyPaths",
)
hidden_property_paths = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths
hidden_property_paths.hidden_paths_on_request = AAZListType(
serialized_name="hiddenPathsOnRequest",
)
hidden_property_paths.hidden_paths_on_response = AAZListType(
serialized_name="hiddenPathsOnResponse",
)
hidden_paths_on_request = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_request
hidden_paths_on_request.Element = AAZStrType()
hidden_paths_on_response = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_response
hidden_paths_on_response.Element = AAZStrType()
managed_resource_group_configuration = cls._schema_on_200.properties.managed_resource_group_configuration
managed_resource_group_configuration.application_ids = AAZListType(
serialized_name="applicationIds",
)
managed_resource_group_configuration.deny_assignment_configuration = AAZObjectType(
serialized_name="denyAssignmentConfiguration",
)
managed_resource_group_configuration.enabled = AAZBoolType()
managed_resource_group_configuration.resource_group_location_override = AAZStrType(
serialized_name="resourceGroupLocationOverride",
)
application_ids = cls._schema_on_200.properties.managed_resource_group_configuration.application_ids
application_ids.Element = AAZStrType()
deny_assignment_configuration = cls._schema_on_200.properties.managed_resource_group_configuration.deny_assignment_configuration
deny_assignment_configuration.enabled = AAZBoolType()
deny_assignment_configuration.not_actions = AAZListType(
serialized_name="notActions",
)
not_actions = cls._schema_on_200.properties.managed_resource_group_configuration.deny_assignment_configuration.not_actions
not_actions.Element = AAZStrType()
management = cls._schema_on_200.properties.management
management.authorization_owners = AAZListType(
serialized_name="authorizationOwners",
)
management.canary_manifest_owners = AAZListType(
serialized_name="canaryManifestOwners",
)
management.error_response_message_options = AAZObjectType(
serialized_name="errorResponseMessageOptions",
)
management.expedited_rollout_metadata = AAZObjectType(
serialized_name="expeditedRolloutMetadata",
)
management.expedited_rollout_submitters = AAZListType(
serialized_name="expeditedRolloutSubmitters",
)
management.incident_contact_email = AAZStrType(
serialized_name="incidentContactEmail",
)
management.incident_routing_service = AAZStrType(
serialized_name="incidentRoutingService",
)
management.incident_routing_team = AAZStrType(
serialized_name="incidentRoutingTeam",
)
management.manifest_owners = AAZListType(
serialized_name="manifestOwners",
)
management.pc_code = AAZStrType(
serialized_name="pcCode",
)
management.profit_center_program_id = AAZStrType(
serialized_name="profitCenterProgramId",
)
management.resource_access_policy = AAZStrType(
serialized_name="resourceAccessPolicy",
)
management.resource_access_roles = AAZListType(
serialized_name="resourceAccessRoles",
)
management.schema_owners = AAZListType(
serialized_name="schemaOwners",
)
management.service_tree_infos = AAZListType(
serialized_name="serviceTreeInfos",
)
authorization_owners = cls._schema_on_200.properties.management.authorization_owners
authorization_owners.Element = AAZStrType()
canary_manifest_owners = cls._schema_on_200.properties.management.canary_manifest_owners
canary_manifest_owners.Element = AAZStrType()
error_response_message_options = cls._schema_on_200.properties.management.error_response_message_options
error_response_message_options.server_failure_response_message_type = AAZStrType(
serialized_name="serverFailureResponseMessageType",
)
expedited_rollout_metadata = cls._schema_on_200.properties.management.expedited_rollout_metadata
expedited_rollout_metadata.enabled = AAZBoolType()
expedited_rollout_metadata.expedited_rollout_intent = AAZStrType(
serialized_name="expeditedRolloutIntent",
)
expedited_rollout_submitters = cls._schema_on_200.properties.management.expedited_rollout_submitters
expedited_rollout_submitters.Element = AAZStrType()
manifest_owners = cls._schema_on_200.properties.management.manifest_owners
manifest_owners.Element = AAZStrType()
resource_access_roles = cls._schema_on_200.properties.management.resource_access_roles
resource_access_roles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.management.resource_access_roles.Element
_element.actions = AAZListType()
_element.allowed_group_claims = AAZListType(
serialized_name="allowedGroupClaims",
)
actions = cls._schema_on_200.properties.management.resource_access_roles.Element.actions
actions.Element = AAZStrType()
allowed_group_claims = cls._schema_on_200.properties.management.resource_access_roles.Element.allowed_group_claims
allowed_group_claims.Element = AAZStrType()
schema_owners = cls._schema_on_200.properties.management.schema_owners
schema_owners.Element = AAZStrType()
service_tree_infos = cls._schema_on_200.properties.management.service_tree_infos
service_tree_infos.Element = AAZObjectType()
_WaitHelper._build_schema_service_tree_info_read(
service_tree_infos.Element)
marketplace_options = cls._schema_on_200.properties.marketplace_options
marketplace_options.add_on_plan_conversion_allowed = AAZBoolType(
serialized_name="addOnPlanConversionAllowed",
)
metadata = cls._schema_on_200.properties.metadata
metadata.Element = AAZFreeFormDictType()
notifications = cls._schema_on_200.properties.notifications
notifications.Element = AAZObjectType()
_element = cls._schema_on_200.properties.notifications.Element
_element.notification_type = AAZStrType(
serialized_name="notificationType",
)
_element.skip_notifications = AAZStrType(
serialized_name="skipNotifications",
)
on_behalf_of_tokens = cls._schema_on_200.properties.on_behalf_of_tokens
on_behalf_of_tokens.action_name = AAZStrType(
serialized_name="actionName",
)
on_behalf_of_tokens.life_time = AAZStrType(
serialized_name="lifeTime",
)
open_api_configuration = cls._schema_on_200.properties.open_api_configuration
open_api_configuration.validation = AAZObjectType()
validation = cls._schema_on_200.properties.open_api_configuration.validation
validation.allow_noncompliant_collection_response = AAZBoolType(
serialized_name="allowNoncompliantCollectionResponse",
)
private_endpoint_configuration = cls._schema_on_200.properties.private_endpoint_configuration
private_endpoint_configuration.group_connectivity_information = AAZListType(
serialized_name="groupConnectivityInformation",
flags={"required": True},
)
private_endpoint_configuration.min_api_version = AAZStrType(
serialized_name="minApiVersion",
flags={"required": True},
)
group_connectivity_information = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information
group_connectivity_information.Element = AAZObjectType()
_element = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element
_element.group_id = AAZStrType(
serialized_name="groupId",
flags={"required": True},
)
_element.redirect_map_id = AAZStrType(
serialized_name="redirectMapId",
)
_element.required_members = AAZListType(
serialized_name="requiredMembers",
flags={"required": True},
)
_element.required_zone_names = AAZListType(
serialized_name="requiredZoneNames",
flags={"required": True},
)
required_members = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element.required_members
required_members.Element = AAZStrType()
required_zone_names = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element.required_zone_names
required_zone_names.Element = AAZStrType()
quota_rule = cls._schema_on_200.properties.quota_rule
quota_rule.location_rules = AAZListType(
serialized_name="locationRules",
)
quota_rule.quota_policy = AAZStrType(
serialized_name="quotaPolicy",
)
quota_rule.required_features = AAZListType(
serialized_name="requiredFeatures",
)
location_rules = cls._schema_on_200.properties.quota_rule.location_rules
location_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.quota_rule.location_rules.Element
_element.location = AAZStrType()
_element.policy = AAZStrType()
_element.quota_id = AAZStrType(
serialized_name="quotaId",
)
required_features = cls._schema_on_200.properties.quota_rule.required_features
required_features.Element = AAZStrType()
request_header_options = cls._schema_on_200.properties.request_header_options
request_header_options.opt_in_headers = AAZStrType(
serialized_name="optInHeaders",
)
request_header_options.opt_out_headers = AAZStrType(
serialized_name="optOutHeaders",
)
required_features = cls._schema_on_200.properties.required_features
required_features.Element = AAZStrType()
resource_cache = cls._schema_on_200.properties.resource_cache
resource_cache.enable_resource_cache = AAZBoolType(
serialized_name="enableResourceCache",
)
resource_cache.resource_cache_expiration_timespan = AAZStrType(
serialized_name="resourceCacheExpirationTimespan",
)
resource_concurrency_control_options = cls._schema_on_200.properties.resource_concurrency_control_options
resource_concurrency_control_options.Element = AAZObjectType()
_element = cls._schema_on_200.properties.resource_concurrency_control_options.Element
_element.policy = AAZStrType()
resource_graph_configuration = cls._schema_on_200.properties.resource_graph_configuration
resource_graph_configuration.api_version = AAZStrType(
serialized_name="apiVersion",
)
resource_graph_configuration.enabled = AAZBoolType()
resource_management_options = cls._schema_on_200.properties.resource_management_options
resource_management_options.batch_provisioning_support = AAZObjectType(
serialized_name="batchProvisioningSupport",
)
resource_management_options.delete_dependencies = AAZListType(
serialized_name="deleteDependencies",
)
resource_management_options.nested_provisioning_support = AAZObjectType(
serialized_name="nestedProvisioningSupport",
)
batch_provisioning_support = cls._schema_on_200.properties.resource_management_options.batch_provisioning_support
batch_provisioning_support.supported_operations = AAZStrType(
serialized_name="supportedOperations",
)
delete_dependencies = cls._schema_on_200.properties.resource_management_options.delete_dependencies
delete_dependencies.Element = AAZObjectType()
_element = cls._schema_on_200.properties.resource_management_options.delete_dependencies.Element
_element.linked_property = AAZStrType(
serialized_name="linkedProperty",
)
_element.linked_type = AAZStrType(
serialized_name="linkedType",
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
required_features = cls._schema_on_200.properties.resource_management_options.delete_dependencies.Element.required_features
required_features.Element = AAZStrType()
nested_provisioning_support = cls._schema_on_200.properties.resource_management_options.nested_provisioning_support
nested_provisioning_support.minimum_api_version = AAZStrType(
serialized_name="minimumApiVersion",
)
resource_move_policy = cls._schema_on_200.properties.resource_move_policy
resource_move_policy.cross_resource_group_move_enabled = AAZBoolType(
serialized_name="crossResourceGroupMoveEnabled",
)
resource_move_policy.cross_subscription_move_enabled = AAZBoolType(
serialized_name="crossSubscriptionMoveEnabled",
)
resource_move_policy.validation_required = AAZBoolType(
serialized_name="validationRequired",
)
resource_provider_authorization_rules = cls._schema_on_200.properties.resource_provider_authorization_rules
resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType(
serialized_name="asyncOperationPollingRules",
)
async_operation_polling_rules = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules
async_operation_polling_rules.additional_options = AAZStrType(
serialized_name="additionalOptions",
)
async_operation_polling_rules.authorization_actions = AAZListType(
serialized_name="authorizationActions",
)
authorization_actions = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions
authorization_actions.Element = AAZStrType()
resource_query_management = cls._schema_on_200.properties.resource_query_management
resource_query_management.filter_option = AAZStrType(
serialized_name="filterOption",
)
resource_type_common_attribute_management = cls._schema_on_200.properties.resource_type_common_attribute_management
resource_type_common_attribute_management.common_api_versions_merge_mode = AAZStrType(
serialized_name="commonApiVersionsMergeMode",
)
routing_rule = cls._schema_on_200.properties.routing_rule
routing_rule.host_resource_type = AAZStrType(
serialized_name="hostResourceType",
)
service_tree_infos = cls._schema_on_200.properties.service_tree_infos
service_tree_infos.Element = AAZObjectType()
_WaitHelper._build_schema_service_tree_info_read(
service_tree_infos.Element)
subscription_lifecycle_notification_specifications = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications
subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType(
serialized_name="softDeleteTTL",
)
subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType(
serialized_name="subscriptionStateOverrideActions",
)
subscription_state_override_actions = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions
subscription_state_override_actions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType(
flags={"required": True},
)
subscription_state_rules = cls._schema_on_200.properties.subscription_state_rules
subscription_state_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.subscription_state_rules.Element
_element.allowed_actions = AAZListType(
serialized_name="allowedActions",
)
_element.state = AAZStrType()
allowed_actions = cls._schema_on_200.properties.subscription_state_rules.Element.allowed_actions
allowed_actions.Element = AAZStrType()
swagger_specifications = cls._schema_on_200.properties.swagger_specifications
swagger_specifications.Element = AAZObjectType()
_element = cls._schema_on_200.properties.swagger_specifications.Element
_element.api_versions = AAZListType(
serialized_name="apiVersions",
)
_element.swagger_spec_folder_uri = AAZStrType(
serialized_name="swaggerSpecFolderUri",
)
api_versions = cls._schema_on_200.properties.swagger_specifications.Element.api_versions
api_versions.Element = AAZStrType()
template_deployment_options = cls._schema_on_200.properties.template_deployment_options
template_deployment_options.preflight_options = AAZListType(
serialized_name="preflightOptions",
)
template_deployment_options.preflight_supported = AAZBoolType(
serialized_name="preflightSupported",
)
preflight_options = cls._schema_on_200.properties.template_deployment_options.preflight_options
preflight_options.Element = AAZStrType()
template_deployment_policy = cls._schema_on_200.properties.template_deployment_policy
template_deployment_policy.capabilities = AAZStrType(
flags={"required": True},
)
template_deployment_policy.preflight_notifications = AAZStrType(
serialized_name="preflightNotifications",
)
template_deployment_policy.preflight_options = AAZStrType(
serialized_name="preflightOptions",
flags={"required": True},
)
throttling_rules = cls._schema_on_200.properties.throttling_rules
throttling_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.throttling_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.application_id = AAZListType(
serialized_name="applicationId",
)
_element.metrics = AAZListType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
application_id = cls._schema_on_200.properties.throttling_rules.Element.application_id
application_id.Element = AAZStrType()
metrics = cls._schema_on_200.properties.throttling_rules.Element.metrics
metrics.Element = AAZObjectType()
_element = cls._schema_on_200.properties.throttling_rules.Element.metrics.Element
_element.interval = AAZStrType()
_element.limit = AAZIntType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
required_features = cls._schema_on_200.properties.throttling_rules.Element.required_features
required_features.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 ResourceTypeRegistrationsGet(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 | 121 | 15 | 106 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 1,110 | 148 | 962 | 127 | 945 | 0 | 489 | 120 | 479 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_create.py
|
azext_providerhub.aaz.latest.providerhub.sku._create.Create.SkusCreateOrUpdate
|
class SkusCreateOrUpdate(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("skuSettings", AAZListType, ".sku_settings", typ_kwargs={
"flags": {"required": True}})
sku_settings = _builder.get(".properties.skuSettings")
if sku_settings is not None:
sku_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("capacity", AAZObjectType, ".capacity")
_elements.set_prop("costs", AAZListType, ".costs")
_elements.set_prop("family", AAZStrType, ".family")
_elements.set_prop("kind", AAZStrType, ".kind")
_elements.set_prop(
"locationInfo", AAZListType, ".location_info")
_elements.set_prop("locations", AAZListType, ".locations")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("requiredFeatures",
AAZListType, ".required_features")
_elements.set_prop("requiredQuotaIds",
AAZListType, ".required_quota_ids")
_elements.set_prop("size", AAZStrType, ".size")
_elements.set_prop("tier", AAZStrType, ".tier")
capabilities = _builder.get(
".properties.skuSettings[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
capacity = _builder.get(".properties.skuSettings[].capacity")
if capacity is not None:
capacity.set_prop("default", AAZIntType, ".default")
capacity.set_prop("maximum", AAZIntType, ".maximum")
capacity.set_prop("minimum", AAZIntType, ".minimum", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("scaleType", AAZStrType, ".scale_type")
costs = _builder.get(".properties.skuSettings[].costs")
if costs is not None:
costs.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[].costs[]")
if _elements is not None:
_elements.set_prop(
"extendedUnit", AAZStrType, ".extended_unit")
_elements.set_prop("meterId", AAZStrType, ".meter_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("quantity", AAZIntType, ".quantity")
location_info = _builder.get(
".properties.skuSettings[].locationInfo")
if location_info is not None:
location_info.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[]")
if _elements is not None:
_elements.set_prop("extendedLocations",
AAZListType, ".extended_locations")
_elements.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type")
_elements.set_prop("zoneDetails", AAZListType, ".zone_details")
_elements.set_prop("zones", AAZListType, ".zones")
extended_locations = _builder.get(
".properties.skuSettings[].locationInfo[].extendedLocations")
if extended_locations is not None:
extended_locations.set_elements(AAZStrType, ".")
zone_details = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails")
if zone_details is not None:
zone_details.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("name", AAZListType, ".name")
capabilities = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
name = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].name")
if name is not None:
name.set_elements(AAZStrType, ".")
zones = _builder.get(
".properties.skuSettings[].locationInfo[].zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
locations = _builder.get(".properties.skuSettings[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
required_features = _builder.get(
".properties.skuSettings[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
required_quota_ids = _builder.get(
".properties.skuSettings[].requiredQuotaIds")
if required_quota_ids is not None:
required_quota_ids.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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusCreateOrUpdate(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 | 31 | 4 | 27 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 335 | 53 | 282 | 58 | 263 | 0 | 184 | 50 | 173 | 19 | 1 | 1 | 30 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_delete.py
|
azext_providerhub.aaz.latest.providerhub.sku._delete.Delete.SkusDelete
|
class SkusDelete(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SkusDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 65 | 9 | 56 | 19 | 42 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_list.py
|
azext_providerhub.aaz.latest.providerhub.sku._list.List.SkusListByResourceTypeRegistrations
|
class SkusListByResourceTypeRegistrations(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.value.Element.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.value.Element.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusListByResourceTypeRegistrations(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 | 3 | 21 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 233 | 35 | 198 | 42 | 181 | 0 | 110 | 35 | 100 | 2 | 1 | 1 | 11 |
10,306 |
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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_create.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._create.Create.SkusCreateOrUpdateNestedResourceTypeThird
|
class SkusCreateOrUpdateNestedResourceTypeThird(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeThird", self.ctx.args.nested_resource_type_third,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("skuSettings", AAZListType, ".sku_settings", typ_kwargs={
"flags": {"required": True}})
sku_settings = _builder.get(".properties.skuSettings")
if sku_settings is not None:
sku_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("capacity", AAZObjectType, ".capacity")
_elements.set_prop("costs", AAZListType, ".costs")
_elements.set_prop("family", AAZStrType, ".family")
_elements.set_prop("kind", AAZStrType, ".kind")
_elements.set_prop(
"locationInfo", AAZListType, ".location_info")
_elements.set_prop("locations", AAZListType, ".locations")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("requiredFeatures",
AAZListType, ".required_features")
_elements.set_prop("requiredQuotaIds",
AAZListType, ".required_quota_ids")
_elements.set_prop("size", AAZStrType, ".size")
_elements.set_prop("tier", AAZStrType, ".tier")
capabilities = _builder.get(
".properties.skuSettings[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
capacity = _builder.get(".properties.skuSettings[].capacity")
if capacity is not None:
capacity.set_prop("default", AAZIntType, ".default")
capacity.set_prop("maximum", AAZIntType, ".maximum")
capacity.set_prop("minimum", AAZIntType, ".minimum", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("scaleType", AAZStrType, ".scale_type")
costs = _builder.get(".properties.skuSettings[].costs")
if costs is not None:
costs.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[].costs[]")
if _elements is not None:
_elements.set_prop(
"extendedUnit", AAZStrType, ".extended_unit")
_elements.set_prop("meterId", AAZStrType, ".meter_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("quantity", AAZIntType, ".quantity")
location_info = _builder.get(
".properties.skuSettings[].locationInfo")
if location_info is not None:
location_info.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[]")
if _elements is not None:
_elements.set_prop("extendedLocations",
AAZListType, ".extended_locations")
_elements.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type")
_elements.set_prop("zoneDetails", AAZListType, ".zone_details")
_elements.set_prop("zones", AAZListType, ".zones")
extended_locations = _builder.get(
".properties.skuSettings[].locationInfo[].extendedLocations")
if extended_locations is not None:
extended_locations.set_elements(AAZStrType, ".")
zone_details = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails")
if zone_details is not None:
zone_details.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("name", AAZListType, ".name")
capabilities = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
name = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].name")
if name is not None:
name.set_elements(AAZStrType, ".")
zones = _builder.get(
".properties.skuSettings[].locationInfo[].zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
locations = _builder.get(".properties.skuSettings[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
required_features = _builder.get(
".properties.skuSettings[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
required_quota_ids = _builder.get(
".properties.skuSettings[].requiredQuotaIds")
if required_quota_ids is not None:
required_quota_ids.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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusCreateOrUpdateNestedResourceTypeThird(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 | 33 | 4 | 28 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 347 | 53 | 294 | 58 | 275 | 0 | 184 | 50 | 173 | 19 | 1 | 1 | 30 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._update.Update.SkusGetNestedResourceTypeSecond
|
class SkusGetNestedResourceTypeSecond(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusGetNestedResourceTypeSecond(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 94 | 13 | 81 | 25 | 64 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._update.Update.SkusCreateOrUpdateNestedResourceTypeSecond
|
class SkusCreateOrUpdateNestedResourceTypeSecond(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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(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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusCreateOrUpdateNestedResourceTypeSecond(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 106 | 15 | 91 | 28 | 72 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_show.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._show.Show.SkusGetNestedResourceTypeSecond
|
class SkusGetNestedResourceTypeSecond(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusGetNestedResourceTypeSecond(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 | 3 | 21 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 236 | 33 | 203 | 41 | 186 | 0 | 105 | 34 | 95 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_list.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._list.List.SkusListByResourceTypeRegistrationsNestedResourceTypeSecond
|
class SkusListByResourceTypeRegistrationsNestedResourceTypeSecond(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.value.Element.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.value.Element.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusListByResourceTypeRegistrationsNestedResourceTypeSecond(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 | 3 | 22 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 241 | 35 | 206 | 42 | 189 | 0 | 110 | 35 | 100 | 2 | 1 | 1 | 11 |
10,311 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_operations.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._operations.Operations
|
class Operations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s
:attr:`operations` attribute.
"""
models = _models
def __init__(self, *args, **kwargs):
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.OperationDetail"]:
"""Lists all of the available REST API operations of the Microsoft.AppPlatform provider.
:return: An iterator like instance of either OperationDetail or the result of cls(response)
:rtype:
~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.OperationDetail]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
cls: ClsType[_models.AvailableOperations] = kwargs.pop("cls", None)
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
def prepare_request(next_link=None):
if not next_link:
_request = build_list_request(
api_version=api_version,
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
else:
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
def extract_data(pipeline_response):
deserialized = self._deserialize("AvailableOperations", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
_request = prepare_request(next_link)
_stream = False
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **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)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(get_next, extract_data)
|
class Operations:
'''
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s
:attr:`operations` attribute.
'''
def __init__(self, *args, **kwargs):
pass
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.OperationDetail"]:
'''Lists all of the available REST API operations of the Microsoft.AppPlatform provider.
:return: An iterator like instance of either OperationDetail or the result of cls(response)
:rtype:
~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.OperationDetail]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
def prepare_request(next_link=None):
pass
def extract_data(pipeline_response):
pass
def get_next(next_link=None):
pass
| 7 | 2 | 26 | 3 | 21 | 2 | 3 | 0.25 | 0 | 3 | 0 | 0 | 2 | 5 | 2 | 2 | 95 | 16 | 65 | 28 | 58 | 16 | 45 | 27 | 39 | 6 | 0 | 1 | 13 |
10,312 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_monitoring_settings_operations.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._monitoring_settings_operations.MonitoringSettingsOperations
|
class MonitoringSettingsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s
:attr:`monitoring_settings` attribute.
"""
models = _models
def __init__(self, *args, **kwargs):
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.MonitoringSettingResource:
"""Get the Monitoring Setting and its properties.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:return: MonitoringSettingResource or the result of cls(response)
:rtype: ~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
cls: ClsType[_models.MonitoringSettingResource] = kwargs.pop("cls", None)
_request = build_get_request(
resource_group_name=resource_group_name,
service_name=service_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_stream = False
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **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)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
def _update_put_initial(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> _models.MonitoringSettingResource:
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.MonitoringSettingResource] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(monitoring_setting_resource, (IOBase, bytes)):
_content = monitoring_setting_resource
else:
_json = self._serialize.body(monitoring_setting_resource, "MonitoringSettingResource")
_request = build_update_put_request(
resource_group_name=resource_group_name,
service_name=service_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_stream = False
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
@overload
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Is either a
MonitoringSettingResource type or a IO[bytes] type. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource or IO[bytes]
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.MonitoringSettingResource] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._update_put_initial(
resource_group_name=resource_group_name,
service_name=service_name,
monitoring_setting_resource=monitoring_setting_resource,
api_version=api_version,
content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
if polling is True:
polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller[_models.MonitoringSettingResource].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller[_models.MonitoringSettingResource](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
def _update_patch_initial(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> _models.MonitoringSettingResource:
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.MonitoringSettingResource] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(monitoring_setting_resource, (IOBase, bytes)):
_content = monitoring_setting_resource
else:
_json = self._serialize.body(monitoring_setting_resource, "MonitoringSettingResource")
_request = build_update_patch_request(
resource_group_name=resource_group_name,
service_name=service_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_stream = False
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
@overload
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
"""Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Is either a
MonitoringSettingResource type or a IO[bytes] type. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource or IO[bytes]
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.MonitoringSettingResource] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._update_patch_initial(
resource_group_name=resource_group_name,
service_name=service_name,
monitoring_setting_resource=monitoring_setting_resource,
api_version=api_version,
content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize("MonitoringSettingResource", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
if polling is True:
polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller[_models.MonitoringSettingResource].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller[_models.MonitoringSettingResource](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
|
class MonitoringSettingsOperations:
'''
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s
:attr:`monitoring_settings` attribute.
'''
def __init__(self, *args, **kwargs):
pass
@distributed_trace
def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.MonitoringSettingResource:
'''Get the Monitoring Setting and its properties.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:return: MonitoringSettingResource or the result of cls(response)
:rtype: ~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
def _update_put_initial(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> _models.MonitoringSettingResource:
pass
@overload
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
@overload
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
@distributed_trace
def begin_update_put(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Is either a
MonitoringSettingResource type or a IO[bytes] type. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource or IO[bytes]
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
def get_long_running_output(pipeline_response):
pass
def _update_patch_initial(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> _models.MonitoringSettingResource:
pass
@overload
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
@overload
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Required.
:type monitoring_setting_resource: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
@distributed_trace
def begin_update_patch(
self,
resource_group_name: str,
service_name: str,
monitoring_setting_resource: _models.MonitoringSettingResource,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.MonitoringSettingResource]:
'''Update the Monitoring Setting.
:param resource_group_name: The name of the resource group that contains the resource. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type resource_group_name: str
:param service_name: The name of the Service resource. Required.
:type service_name: str
:param monitoring_setting_resource: Parameters for the update operation. Is either a
MonitoringSettingResource type or a IO[bytes] type. Required.
:type monitoring_setting_resource:
~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource or IO[bytes]
:return: An instance of LROPoller that returns either MonitoringSettingResource or the result
of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.MonitoringSettingResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
def get_long_running_output(pipeline_response):
pass
| 20 | 8 | 37 | 4 | 24 | 11 | 3 | 0.45 | 0 | 7 | 0 | 0 | 10 | 5 | 10 | 10 | 467 | 56 | 292 | 141 | 216 | 132 | 141 | 78 | 128 | 6 | 0 | 1 | 39 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_delete.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._delete.Delete.SkusDeleteNestedResourceTypeSecond
|
class SkusDeleteNestedResourceTypeSecond(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SkusDeleteNestedResourceTypeSecond(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 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 73 | 9 | 64 | 19 | 50 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/operation/_update.py
|
azext_providerhub.aaz.latest.providerhub.operation._update.Update.OperationsCreateOrUpdate
|
class OperationsCreateOrUpdate(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.ProviderHub/providerRegistrations/{providerNamespace}/operations/default",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-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(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.contents = AAZListType()
contents = cls._schema_on_200.properties.contents
contents.Element = AAZObjectType()
_element = cls._schema_on_200.properties.contents.Element
_element.action_type = AAZStrType(
serialized_name="actionType",
)
_element.display = AAZObjectType(
flags={"required": True},
)
_element.is_data_action = AAZBoolType(
serialized_name="isDataAction",
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.origin = AAZStrType()
display = cls._schema_on_200.properties.contents.Element.display
display.cs = AAZObjectType()
display.de = AAZObjectType()
display.default = AAZObjectType(
flags={"required": True},
)
display.en = AAZObjectType()
display.es = AAZObjectType()
display.fr = AAZObjectType()
display.hu = AAZObjectType()
display.it = AAZObjectType()
display.ja = AAZObjectType()
display.ko = AAZObjectType()
display.nl = AAZObjectType()
display.pl = AAZObjectType()
display.pt_br = AAZObjectType(
serialized_name="ptBR",
)
display.pt_pt = AAZObjectType(
serialized_name="ptPT",
)
display.ru = AAZObjectType()
display.sv = AAZObjectType()
display.zh_hans = AAZObjectType(
serialized_name="zhHans",
)
display.zh_hant = AAZObjectType(
serialized_name="zhHant",
)
cs = cls._schema_on_200.properties.contents.Element.display.cs
cs.description = AAZStrType(
flags={"required": True},
)
cs.operation = AAZStrType(
flags={"required": True},
)
cs.provider = AAZStrType(
flags={"required": True},
)
cs.resource = AAZStrType(
flags={"required": True},
)
de = cls._schema_on_200.properties.contents.Element.display.de
de.description = AAZStrType(
flags={"required": True},
)
de.operation = AAZStrType(
flags={"required": True},
)
de.provider = AAZStrType(
flags={"required": True},
)
de.resource = AAZStrType(
flags={"required": True},
)
default = cls._schema_on_200.properties.contents.Element.display.default
default.description = AAZStrType(
flags={"required": True},
)
default.operation = AAZStrType(
flags={"required": True},
)
default.provider = AAZStrType(
flags={"required": True},
)
default.resource = AAZStrType(
flags={"required": True},
)
en = cls._schema_on_200.properties.contents.Element.display.en
en.description = AAZStrType(
flags={"required": True},
)
en.operation = AAZStrType(
flags={"required": True},
)
en.provider = AAZStrType(
flags={"required": True},
)
en.resource = AAZStrType(
flags={"required": True},
)
es = cls._schema_on_200.properties.contents.Element.display.es
es.description = AAZStrType(
flags={"required": True},
)
es.operation = AAZStrType(
flags={"required": True},
)
es.provider = AAZStrType(
flags={"required": True},
)
es.resource = AAZStrType(
flags={"required": True},
)
fr = cls._schema_on_200.properties.contents.Element.display.fr
fr.description = AAZStrType(
flags={"required": True},
)
fr.operation = AAZStrType(
flags={"required": True},
)
fr.provider = AAZStrType(
flags={"required": True},
)
fr.resource = AAZStrType(
flags={"required": True},
)
hu = cls._schema_on_200.properties.contents.Element.display.hu
hu.description = AAZStrType(
flags={"required": True},
)
hu.operation = AAZStrType(
flags={"required": True},
)
hu.provider = AAZStrType(
flags={"required": True},
)
hu.resource = AAZStrType(
flags={"required": True},
)
it = cls._schema_on_200.properties.contents.Element.display.it
it.description = AAZStrType(
flags={"required": True},
)
it.operation = AAZStrType(
flags={"required": True},
)
it.provider = AAZStrType(
flags={"required": True},
)
it.resource = AAZStrType(
flags={"required": True},
)
ja = cls._schema_on_200.properties.contents.Element.display.ja
ja.description = AAZStrType(
flags={"required": True},
)
ja.operation = AAZStrType(
flags={"required": True},
)
ja.provider = AAZStrType(
flags={"required": True},
)
ja.resource = AAZStrType(
flags={"required": True},
)
ko = cls._schema_on_200.properties.contents.Element.display.ko
ko.description = AAZStrType(
flags={"required": True},
)
ko.operation = AAZStrType(
flags={"required": True},
)
ko.provider = AAZStrType(
flags={"required": True},
)
ko.resource = AAZStrType(
flags={"required": True},
)
nl = cls._schema_on_200.properties.contents.Element.display.nl
nl.description = AAZStrType(
flags={"required": True},
)
nl.operation = AAZStrType(
flags={"required": True},
)
nl.provider = AAZStrType(
flags={"required": True},
)
nl.resource = AAZStrType(
flags={"required": True},
)
pl = cls._schema_on_200.properties.contents.Element.display.pl
pl.description = AAZStrType(
flags={"required": True},
)
pl.operation = AAZStrType(
flags={"required": True},
)
pl.provider = AAZStrType(
flags={"required": True},
)
pl.resource = AAZStrType(
flags={"required": True},
)
pt_br = cls._schema_on_200.properties.contents.Element.display.pt_br
pt_br.description = AAZStrType(
flags={"required": True},
)
pt_br.operation = AAZStrType(
flags={"required": True},
)
pt_br.provider = AAZStrType(
flags={"required": True},
)
pt_br.resource = AAZStrType(
flags={"required": True},
)
pt_pt = cls._schema_on_200.properties.contents.Element.display.pt_pt
pt_pt.description = AAZStrType(
flags={"required": True},
)
pt_pt.operation = AAZStrType(
flags={"required": True},
)
pt_pt.provider = AAZStrType(
flags={"required": True},
)
pt_pt.resource = AAZStrType(
flags={"required": True},
)
ru = cls._schema_on_200.properties.contents.Element.display.ru
ru.description = AAZStrType(
flags={"required": True},
)
ru.operation = AAZStrType(
flags={"required": True},
)
ru.provider = AAZStrType(
flags={"required": True},
)
ru.resource = AAZStrType(
flags={"required": True},
)
sv = cls._schema_on_200.properties.contents.Element.display.sv
sv.description = AAZStrType(
flags={"required": True},
)
sv.operation = AAZStrType(
flags={"required": True},
)
sv.provider = AAZStrType(
flags={"required": True},
)
sv.resource = AAZStrType(
flags={"required": True},
)
zh_hans = cls._schema_on_200.properties.contents.Element.display.zh_hans
zh_hans.description = AAZStrType(
flags={"required": True},
)
zh_hans.operation = AAZStrType(
flags={"required": True},
)
zh_hans.provider = AAZStrType(
flags={"required": True},
)
zh_hans.resource = AAZStrType(
flags={"required": True},
)
zh_hant = cls._schema_on_200.properties.contents.Element.display.zh_hant
zh_hant.description = AAZStrType(
flags={"required": True},
)
zh_hant.operation = AAZStrType(
flags={"required": True},
)
zh_hant.provider = AAZStrType(
flags={"required": True},
)
zh_hant.resource = 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",
)
return cls._schema_on_200
|
class OperationsCreateOrUpdate(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 | 41 | 3 | 38 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 428 | 39 | 389 | 52 | 370 | 0 | 167 | 44 | 156 | 2 | 1 | 1 | 12 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_second/_create.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_second._create.Create.SkusCreateOrUpdateNestedResourceTypeSecond
|
class SkusCreateOrUpdateNestedResourceTypeSecond(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("skuSettings", AAZListType, ".sku_settings", typ_kwargs={
"flags": {"required": True}})
sku_settings = _builder.get(".properties.skuSettings")
if sku_settings is not None:
sku_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("capacity", AAZObjectType, ".capacity")
_elements.set_prop("costs", AAZListType, ".costs")
_elements.set_prop("family", AAZStrType, ".family")
_elements.set_prop("kind", AAZStrType, ".kind")
_elements.set_prop(
"locationInfo", AAZListType, ".location_info")
_elements.set_prop("locations", AAZListType, ".locations")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("requiredFeatures",
AAZListType, ".required_features")
_elements.set_prop("requiredQuotaIds",
AAZListType, ".required_quota_ids")
_elements.set_prop("size", AAZStrType, ".size")
_elements.set_prop("tier", AAZStrType, ".tier")
capabilities = _builder.get(
".properties.skuSettings[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
capacity = _builder.get(".properties.skuSettings[].capacity")
if capacity is not None:
capacity.set_prop("default", AAZIntType, ".default")
capacity.set_prop("maximum", AAZIntType, ".maximum")
capacity.set_prop("minimum", AAZIntType, ".minimum", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("scaleType", AAZStrType, ".scale_type")
costs = _builder.get(".properties.skuSettings[].costs")
if costs is not None:
costs.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[].costs[]")
if _elements is not None:
_elements.set_prop(
"extendedUnit", AAZStrType, ".extended_unit")
_elements.set_prop("meterId", AAZStrType, ".meter_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("quantity", AAZIntType, ".quantity")
location_info = _builder.get(
".properties.skuSettings[].locationInfo")
if location_info is not None:
location_info.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[]")
if _elements is not None:
_elements.set_prop("extendedLocations",
AAZListType, ".extended_locations")
_elements.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type")
_elements.set_prop("zoneDetails", AAZListType, ".zone_details")
_elements.set_prop("zones", AAZListType, ".zones")
extended_locations = _builder.get(
".properties.skuSettings[].locationInfo[].extendedLocations")
if extended_locations is not None:
extended_locations.set_elements(AAZStrType, ".")
zone_details = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails")
if zone_details is not None:
zone_details.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("name", AAZListType, ".name")
capabilities = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
name = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].name")
if name is not None:
name.set_elements(AAZStrType, ".")
zones = _builder.get(
".properties.skuSettings[].locationInfo[].zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
locations = _builder.get(".properties.skuSettings[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
required_features = _builder.get(
".properties.skuSettings[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
required_quota_ids = _builder.get(
".properties.skuSettings[].requiredQuotaIds")
if required_quota_ids is not None:
required_quota_ids.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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusCreateOrUpdateNestedResourceTypeSecond(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 | 32 | 4 | 28 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 343 | 53 | 290 | 58 | 271 | 0 | 184 | 50 | 173 | 19 | 1 | 1 | 30 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._update.Update.SkusCreateOrUpdateNestedResourceTypeFirst
|
class SkusCreateOrUpdateNestedResourceTypeFirst(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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(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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusCreateOrUpdateNestedResourceTypeFirst(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 102 | 15 | 87 | 28 | 68 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_show.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._show.Show.SkusGetNestedResourceTypeFirst
|
class SkusGetNestedResourceTypeFirst(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusGetNestedResourceTypeFirst(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 | 3 | 21 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 232 | 33 | 199 | 41 | 182 | 0 | 105 | 34 | 95 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_list.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._list.List.SkusListByResourceTypeRegistrationsNestedResourceTypeFirst
|
class SkusListByResourceTypeRegistrationsNestedResourceTypeFirst(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.value.Element.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.value.Element.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusListByResourceTypeRegistrationsNestedResourceTypeFirst(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 | 3 | 21 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 237 | 35 | 202 | 42 | 185 | 0 | 110 | 35 | 100 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_delete.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._delete.Delete.SkusDeleteNestedResourceTypeFirst
|
class SkusDeleteNestedResourceTypeFirst(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SkusDeleteNestedResourceTypeFirst(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 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 69 | 9 | 60 | 19 | 46 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_create.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._create.Create.SkusCreateOrUpdateNestedResourceTypeFirst
|
class SkusCreateOrUpdateNestedResourceTypeFirst(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("skuSettings", AAZListType, ".sku_settings", typ_kwargs={
"flags": {"required": True}})
sku_settings = _builder.get(".properties.skuSettings")
if sku_settings is not None:
sku_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("capacity", AAZObjectType, ".capacity")
_elements.set_prop("costs", AAZListType, ".costs")
_elements.set_prop("family", AAZStrType, ".family")
_elements.set_prop("kind", AAZStrType, ".kind")
_elements.set_prop(
"locationInfo", AAZListType, ".location_info")
_elements.set_prop("locations", AAZListType, ".locations")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("requiredFeatures",
AAZListType, ".required_features")
_elements.set_prop("requiredQuotaIds",
AAZListType, ".required_quota_ids")
_elements.set_prop("size", AAZStrType, ".size")
_elements.set_prop("tier", AAZStrType, ".tier")
capabilities = _builder.get(
".properties.skuSettings[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
capacity = _builder.get(".properties.skuSettings[].capacity")
if capacity is not None:
capacity.set_prop("default", AAZIntType, ".default")
capacity.set_prop("maximum", AAZIntType, ".maximum")
capacity.set_prop("minimum", AAZIntType, ".minimum", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("scaleType", AAZStrType, ".scale_type")
costs = _builder.get(".properties.skuSettings[].costs")
if costs is not None:
costs.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.skuSettings[].costs[]")
if _elements is not None:
_elements.set_prop(
"extendedUnit", AAZStrType, ".extended_unit")
_elements.set_prop("meterId", AAZStrType, ".meter_id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("quantity", AAZIntType, ".quantity")
location_info = _builder.get(
".properties.skuSettings[].locationInfo")
if location_info is not None:
location_info.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[]")
if _elements is not None:
_elements.set_prop("extendedLocations",
AAZListType, ".extended_locations")
_elements.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type")
_elements.set_prop("zoneDetails", AAZListType, ".zone_details")
_elements.set_prop("zones", AAZListType, ".zones")
extended_locations = _builder.get(
".properties.skuSettings[].locationInfo[].extendedLocations")
if extended_locations is not None:
extended_locations.set_elements(AAZStrType, ".")
zone_details = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails")
if zone_details is not None:
zone_details.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[]")
if _elements is not None:
_elements.set_prop(
"capabilities", AAZListType, ".capabilities")
_elements.set_prop("name", AAZListType, ".name")
capabilities = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].capabilities")
if capabilities is not None:
_CreateHelper._build_schema_sku_capability_create(
capabilities.set_elements(AAZObjectType, "."))
name = _builder.get(
".properties.skuSettings[].locationInfo[].zoneDetails[].name")
if name is not None:
name.set_elements(AAZStrType, ".")
zones = _builder.get(
".properties.skuSettings[].locationInfo[].zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
locations = _builder.get(".properties.skuSettings[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
required_features = _builder.get(
".properties.skuSettings[].requiredFeatures")
if required_features is not None:
required_features.set_elements(AAZStrType, ".")
required_quota_ids = _builder.get(
".properties.skuSettings[].requiredQuotaIds")
if required_quota_ids is not None:
required_quota_ids.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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_CreateHelper._build_schema_sku_capability_read(
capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusCreateOrUpdateNestedResourceTypeFirst(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 | 32 | 4 | 28 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 339 | 53 | 286 | 58 | 267 | 0 | 184 | 50 | 173 | 19 | 1 | 1 | 30 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku._update.Update.SkusGet
|
class SkusGet(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusGet(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 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku._update.Update.SkusCreateOrUpdate
|
class SkusCreateOrUpdate(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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(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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
10,323 |
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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/_show.py
|
azext_providerhub.aaz.latest.providerhub.sku._show.Show.SkusGet
|
class SkusGet(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}",
**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(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_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.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sku_settings = AAZListType(
serialized_name="skuSettings",
flags={"required": True},
)
sku_settings = cls._schema_on_200.properties.sku_settings
sku_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element
_element.capabilities = AAZListType()
_element.capacity = AAZObjectType()
_element.costs = AAZListType()
_element.family = AAZStrType()
_element.kind = AAZStrType()
_element.location_info = AAZListType(
serialized_name="locationInfo",
)
_element.locations = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.required_features = AAZListType(
serialized_name="requiredFeatures",
)
_element.required_quota_ids = AAZListType(
serialized_name="requiredQuotaIds",
)
_element.size = AAZStrType()
_element.tier = AAZStrType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
capacity = cls._schema_on_200.properties.sku_settings.Element.capacity
capacity.default = AAZIntType()
capacity.maximum = AAZIntType()
capacity.minimum = AAZIntType(
flags={"required": True},
)
capacity.scale_type = AAZStrType(
serialized_name="scaleType",
)
costs = cls._schema_on_200.properties.sku_settings.Element.costs
costs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.costs.Element
_element.extended_unit = AAZStrType(
serialized_name="extendedUnit",
)
_element.meter_id = AAZStrType(
serialized_name="meterId",
flags={"required": True},
)
_element.quantity = AAZIntType()
location_info = cls._schema_on_200.properties.sku_settings.Element.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element
_element.extended_locations = AAZListType(
serialized_name="extendedLocations",
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
)
_element.zones = AAZListType()
extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations
extended_locations.Element = AAZStrType()
zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element
_element.capabilities = AAZListType()
_element.name = AAZListType()
capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ShowHelper._build_schema_sku_capability_read(capabilities.Element)
name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.properties.sku_settings.Element.locations
locations.Element = AAZStrType()
required_features = cls._schema_on_200.properties.sku_settings.Element.required_features
required_features.Element = AAZStrType()
required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids
required_quota_ids.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 SkusGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 23 | 3 | 21 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 228 | 33 | 195 | 41 | 178 | 0 | 105 | 34 | 95 | 2 | 1 | 1 | 11 |
10,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/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_first/_update.py
|
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_first._update.Update.SkusGetNestedResourceTypeFirst
|
class SkusGetNestedResourceTypeFirst(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.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}",
**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(
"nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first,
required=True,
),
**self.serialize_url_param(
"providerNamespace", self.ctx.args.provider_namespace,
required=True,
),
**self.serialize_url_param(
"resourceType", self.ctx.args.resource_type,
required=True,
),
**self.serialize_url_param(
"sku", 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-04-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_sku_resource_read(cls._schema_on_200)
return cls._schema_on_200
|
class SkusGetNestedResourceTypeFirst(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 90 | 13 | 77 | 25 | 60 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
10,325 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.StorageResourceCollection
|
class StorageResourceCollection(_serialization.Model):
"""Collection compose of storage resources list and a possible link for next page.
:ivar value: The storage resources list.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.StorageResource]
:ivar next_link: The link to next page of storage list.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[StorageResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.StorageResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: The storage resources list.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.StorageResource]
:keyword next_link: The link to next page of storage list.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class StorageResourceCollection(_serialization.Model):
'''Collection compose of storage resources list and a possible link for next page.
:ivar value: The storage resources list.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.StorageResource]
:ivar next_link: The link to next page of storage list.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.StorageResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: The storage resources list.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.StorageResource]
:keyword next_link: The link to next page of storage list.
:paramtype next_link: str
'''
pass
| 2 | 2 | 12 | 0 | 6 | 6 | 1 | 1.09 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 3 | 11 | 7 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,326 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.StorageResource
|
class StorageResource(ProxyResource):
"""Storage resource payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the storage resource payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.StorageProperties
"""
_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"},
"system_data": {"key": "systemData", "type": "SystemData"},
"properties": {"key": "properties", "type": "StorageProperties"},
}
def __init__(self, *, properties: Optional["_models.StorageProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the storage resource payload.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.StorageProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class StorageResource(ProxyResource):
'''Storage resource payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the storage resource payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.StorageProperties
'''
def __init__(self, *, properties: Optional["_models.StorageProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the storage resource payload.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.StorageProperties
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 39 | 5 | 17 | 5 | 15 | 17 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
10,327 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.StorageProperties
|
class StorageProperties(_serialization.Model):
"""Storage resource payload.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
StorageAccount
All required parameters must be populated in order to send to server.
:ivar storage_type: The type of the storage. Required. "StorageAccount"
:vartype storage_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.StorageType
"""
_validation = {
"storage_type": {"required": True},
}
_attribute_map = {
"storage_type": {"key": "storageType", "type": "str"},
}
_subtype_map = {"storage_type": {"StorageAccount": "StorageAccount"}}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.storage_type: Optional[str] = None
|
class StorageProperties(_serialization.Model):
'''Storage resource payload.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
StorageAccount
All required parameters must be populated in order to send to server.
:ivar storage_type: The type of the storage. Required. "StorageAccount"
:vartype storage_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.StorageType
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.73 | 1 | 3 | 0 | 1 | 1 | 1 | 1 | 16 | 26 | 7 | 11 | 6 | 9 | 8 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,328 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_predefined_url_category.ListPredefinedUrlCategory.LocalRulestacksListPredefinedUrlCategories
|
class LocalRulestacksListPredefinedUrlCategories(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listPredefinedUrlCategories",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"skip", self.ctx.args.skip,
),
**self.serialize_query_param(
"top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.action = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class LocalRulestacksListPredefinedUrlCategories(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 106 | 16 | 90 | 28 | 73 | 0 | 40 | 21 | 30 | 2 | 1 | 1 | 11 |
10,329 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_firewall.ListFirewall.LocalRulestacksListFirewalls
|
class LocalRulestacksListFirewalls(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listFirewalls",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
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 = AAZStrType()
return cls._schema_on_200
|
class LocalRulestacksListFirewalls(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 | 1 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 92 | 15 | 77 | 27 | 60 | 0 | 37 | 20 | 27 | 2 | 1 | 1 | 11 |
10,330 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_country.ListCountry.LocalRulestacksListCountries
|
class LocalRulestacksListCountries(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listCountries",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"skip", self.ctx.args.skip,
),
**self.serialize_query_param(
"top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.code = AAZStrType(
flags={"required": True},
)
_element.description = AAZStrType()
return cls._schema_on_200
|
class LocalRulestacksListCountries(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 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 104 | 16 | 88 | 28 | 71 | 0 | 40 | 21 | 30 | 2 | 1 | 1 | 11 |
10,331 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_app_id.ListAppId.LocalRulestacksListAppIds
|
class LocalRulestacksListAppIds(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAppIds",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"appIdVersion", self.ctx.args.app_id_version,
),
**self.serialize_query_param(
"appPrefix", self.ctx.args.app_prefix,
),
**self.serialize_query_param(
"skip", self.ctx.args.skip,
),
**self.serialize_query_param(
"top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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 = AAZStrType()
return cls._schema_on_200
|
class LocalRulestacksListAppIds(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 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 104 | 15 | 89 | 27 | 72 | 0 | 37 | 20 | 27 | 2 | 1 | 1 | 11 |
10,332 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_advanced_security_object.ListAdvancedSecurityObject.LocalRulestacksListAdvancedSecurityObjects
|
class LocalRulestacksListAdvancedSecurityObjects(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAdvancedSecurityObjects",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"skip", self.ctx.args.skip,
),
**self.serialize_query_param(
"top", self.ctx.args.top,
),
**self.serialize_query_param(
"type", self.ctx.args.type,
required=True,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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 = AAZObjectType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.entry = AAZListType(
flags={"required": True},
)
value.type = AAZStrType()
entry = cls._schema_on_200.value.entry
entry.Element = AAZObjectType()
_element = cls._schema_on_200.value.entry.Element
_element.description = AAZStrType()
_element.name = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class LocalRulestacksListAdvancedSecurityObjects(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 114 | 17 | 97 | 29 | 80 | 0 | 43 | 22 | 33 | 2 | 1 | 1 | 11 |
10,333 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list.List.LocalRulestacksListBySubscription
|
class LocalRulestacksListBySubscription(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/PaloAltoNetworks.Cloudngfw/localRulestacks",
**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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.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()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.value.Element.properties
properties.associated_subscriptions = AAZListType(
serialized_name="associatedSubscriptions",
)
properties.default_mode = AAZStrType(
serialized_name="defaultMode",
)
properties.description = AAZStrType()
properties.min_app_id_version = AAZStrType(
serialized_name="minAppIdVersion",
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.pan_location = AAZStrType(
serialized_name="panLocation",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.scope = AAZStrType()
properties.security_services = AAZObjectType(
serialized_name="securityServices",
)
associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions
associated_subscriptions.Element = AAZStrType()
security_services = cls._schema_on_200.value.Element.properties.security_services
security_services.anti_spyware_profile = AAZStrType(
serialized_name="antiSpywareProfile",
)
security_services.anti_virus_profile = AAZStrType(
serialized_name="antiVirusProfile",
)
security_services.dns_subscription = AAZStrType(
serialized_name="dnsSubscription",
)
security_services.file_blocking_profile = AAZStrType(
serialized_name="fileBlockingProfile",
)
security_services.outbound_trust_certificate = AAZStrType(
serialized_name="outboundTrustCertificate",
)
security_services.outbound_un_trust_certificate = AAZStrType(
serialized_name="outboundUnTrustCertificate",
)
security_services.url_filtering_profile = AAZStrType(
serialized_name="urlFilteringProfile",
)
security_services.vulnerability_profile = AAZStrType(
serialized_name="vulnerabilityProfile",
)
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 LocalRulestacksListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 21 | 2 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 211 | 24 | 187 | 35 | 170 | 0 | 86 | 28 | 76 | 2 | 1 | 1 | 11 |
10,334 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list.List.LocalRulestacksListByResourceGroup
|
class LocalRulestacksListByResourceGroup(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/PaloAltoNetworks.Cloudngfw/localRulestacks",
**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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.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()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.value.Element.properties
properties.associated_subscriptions = AAZListType(
serialized_name="associatedSubscriptions",
)
properties.default_mode = AAZStrType(
serialized_name="defaultMode",
)
properties.description = AAZStrType()
properties.min_app_id_version = AAZStrType(
serialized_name="minAppIdVersion",
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.pan_location = AAZStrType(
serialized_name="panLocation",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.scope = AAZStrType()
properties.security_services = AAZObjectType(
serialized_name="securityServices",
)
associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions
associated_subscriptions.Element = AAZStrType()
security_services = cls._schema_on_200.value.Element.properties.security_services
security_services.anti_spyware_profile = AAZStrType(
serialized_name="antiSpywareProfile",
)
security_services.anti_virus_profile = AAZStrType(
serialized_name="antiVirusProfile",
)
security_services.dns_subscription = AAZStrType(
serialized_name="dnsSubscription",
)
security_services.file_blocking_profile = AAZStrType(
serialized_name="fileBlockingProfile",
)
security_services.outbound_trust_certificate = AAZStrType(
serialized_name="outboundTrustCertificate",
)
security_services.outbound_un_trust_certificate = AAZStrType(
serialized_name="outboundUnTrustCertificate",
)
security_services.url_filtering_profile = AAZStrType(
serialized_name="urlFilteringProfile",
)
security_services.vulnerability_profile = AAZStrType(
serialized_name="vulnerabilityProfile",
)
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 LocalRulestacksListByResourceGroup(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 | 22 | 2 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 215 | 24 | 191 | 35 | 174 | 0 | 86 | 28 | 76 | 2 | 1 | 1 | 11 |
10,335 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._delete.Delete.LocalRulestacksDelete
|
class LocalRulestacksDelete(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class LocalRulestacksDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
10,336 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._create.Create.LocalRulestacksCreateOrUpdate
|
class LocalRulestacksCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
_elements = _builder.get(".identity.userAssignedIdentities{}")
if _elements is not None:
_elements.set_prop("clientId", AAZStrType, ".client_id")
_elements.set_prop("principalId", AAZStrType, ".principal_id")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("associatedSubscriptions",
AAZListType, ".associated_subscriptions")
properties.set_prop("defaultMode", AAZStrType, ".default_mode")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("minAppIdVersion",
AAZStrType, ".min_app_id_version")
properties.set_prop("panEtag", AAZStrType, ".pan_etag")
properties.set_prop("panLocation", AAZStrType, ".pan_location")
properties.set_prop("scope", AAZStrType, ".scope")
properties.set_prop("securityServices",
AAZObjectType, ".security_services")
associated_subscriptions = _builder.get(
".properties.associatedSubscriptions")
if associated_subscriptions is not None:
associated_subscriptions.set_elements(AAZStrType, ".")
security_services = _builder.get(".properties.securityServices")
if security_services is not None:
security_services.set_prop(
"antiSpywareProfile", AAZStrType, ".anti_spyware_profile")
security_services.set_prop(
"antiVirusProfile", AAZStrType, ".anti_virus_profile")
security_services.set_prop(
"dnsSubscription", AAZStrType, ".dns_subscription")
security_services.set_prop(
"fileBlockingProfile", AAZStrType, ".file_blocking_profile")
security_services.set_prop(
"outboundTrustCertificate", AAZStrType, ".outbound_trust_certificate")
security_services.set_prop(
"outboundUnTrustCertificate", AAZStrType, ".outbound_un_trust_certificate")
security_services.set_prop(
"urlFilteringProfile", AAZStrType, ".url_filtering_profile")
security_services.set_prop(
"vulnerabilityProfile", AAZStrType, ".vulnerability_profile")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200_201.identity
identity.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()
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200_201.properties
properties.associated_subscriptions = AAZListType(
serialized_name="associatedSubscriptions",
)
properties.default_mode = AAZStrType(
serialized_name="defaultMode",
)
properties.description = AAZStrType()
properties.min_app_id_version = AAZStrType(
serialized_name="minAppIdVersion",
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.pan_location = AAZStrType(
serialized_name="panLocation",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.scope = AAZStrType()
properties.security_services = AAZObjectType(
serialized_name="securityServices",
)
associated_subscriptions = cls._schema_on_200_201.properties.associated_subscriptions
associated_subscriptions.Element = AAZStrType()
security_services = cls._schema_on_200_201.properties.security_services
security_services.anti_spyware_profile = AAZStrType(
serialized_name="antiSpywareProfile",
)
security_services.anti_virus_profile = AAZStrType(
serialized_name="antiVirusProfile",
)
security_services.dns_subscription = AAZStrType(
serialized_name="dnsSubscription",
)
security_services.file_blocking_profile = AAZStrType(
serialized_name="fileBlockingProfile",
)
security_services.outbound_trust_certificate = AAZStrType(
serialized_name="outboundTrustCertificate",
)
security_services.outbound_un_trust_certificate = AAZStrType(
serialized_name="outboundUnTrustCertificate",
)
security_services.url_filtering_profile = AAZStrType(
serialized_name="urlFilteringProfile",
)
security_services.vulnerability_profile = AAZStrType(
serialized_name="vulnerabilityProfile",
)
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 LocalRulestacksCreateOrUpdate(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 | 26 | 2 | 24 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 285 | 31 | 254 | 45 | 235 | 0 | 127 | 36 | 116 | 8 | 1 | 1 | 20 |
10,337 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_commit.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._commit.Commit.LocalRulestacksCommit
|
class LocalRulestacksCommit(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/commit",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
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()
_CommitHelper._build_schema_operation_status_result_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class LocalRulestacksCommit(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_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(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 |
10,338 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall.status.default._show.Show.FirewallStatusGet
|
class FirewallStatusGet(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses/default",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.health_reason = AAZStrType(
serialized_name="healthReason",
flags={"read_only": True},
)
properties.health_status = AAZStrType(
serialized_name="healthStatus",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.panorama_status = AAZObjectType(
serialized_name="panoramaStatus",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
panorama_status = cls._schema_on_200.properties.panorama_status
panorama_status.panorama_server2_status = AAZStrType(
serialized_name="panoramaServer2Status",
)
panorama_status.panorama_server_status = AAZStrType(
serialized_name="panoramaServerStatus",
)
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 FirewallStatusGet(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 | 145 | 17 | 128 | 29 | 111 | 0 | 54 | 22 | 44 | 2 | 1 | 1 | 11 |
10,339 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall.status._list.List.FirewallStatusListByFirewalls
|
class FirewallStatusListByFirewalls(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.health_reason = AAZStrType(
serialized_name="healthReason",
flags={"read_only": True},
)
properties.health_status = AAZStrType(
serialized_name="healthStatus",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.panorama_status = AAZObjectType(
serialized_name="panoramaStatus",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
panorama_status = cls._schema_on_200.value.Element.properties.panorama_status
panorama_status.panorama_server2_status = AAZStrType(
serialized_name="panoramaServer2Status",
)
panorama_status.panorama_server_status = AAZStrType(
serialized_name="panoramaServerStatus",
)
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 FirewallStatusListByFirewalls(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 | 156 | 19 | 137 | 31 | 120 | 0 | 59 | 24 | 49 | 2 | 1 | 1 | 11 |
10,340 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_wait.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._wait.Wait.FirewallsGet
|
class FirewallsGet(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.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()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.properties
properties.associated_rulestack = AAZObjectType(
serialized_name="associatedRulestack",
)
properties.dns_settings = AAZObjectType(
serialized_name="dnsSettings",
flags={"required": True},
)
properties.front_end_settings = AAZListType(
serialized_name="frontEndSettings",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
flags={"required": True},
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.panorama_config = AAZObjectType(
serialized_name="panoramaConfig",
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
associated_rulestack = cls._schema_on_200.properties.associated_rulestack
associated_rulestack.location = AAZStrType()
associated_rulestack.resource_id = AAZStrType(
serialized_name="resourceId",
)
associated_rulestack.rulestack_id = AAZStrType(
serialized_name="rulestackId",
)
dns_settings = cls._schema_on_200.properties.dns_settings
dns_settings.dns_servers = AAZListType(
serialized_name="dnsServers",
)
dns_settings.enable_dns_proxy = AAZStrType(
serialized_name="enableDnsProxy",
)
dns_settings.enabled_dns_type = AAZStrType(
serialized_name="enabledDnsType",
)
dns_servers = cls._schema_on_200.properties.dns_settings.dns_servers
dns_servers.Element = AAZObjectType()
_WaitHelper._build_schema_ip_address_read(dns_servers.Element)
front_end_settings = cls._schema_on_200.properties.front_end_settings
front_end_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.front_end_settings.Element
_element.backend_configuration = AAZObjectType(
serialized_name="backendConfiguration",
flags={"required": True},
)
_WaitHelper._build_schema_endpoint_configuration_read(
_element.backend_configuration)
_element.frontend_configuration = AAZObjectType(
serialized_name="frontendConfiguration",
flags={"required": True},
)
_WaitHelper._build_schema_endpoint_configuration_read(
_element.frontend_configuration)
_element.name = AAZStrType(
flags={"required": True},
)
_element.protocol = AAZStrType(
flags={"required": True},
)
marketplace_details = cls._schema_on_200.properties.marketplace_details
marketplace_details.marketplace_subscription_id = AAZStrType(
serialized_name="marketplaceSubscriptionId",
flags={"read_only": True},
)
marketplace_details.marketplace_subscription_status = AAZStrType(
serialized_name="marketplaceSubscriptionStatus",
)
marketplace_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
marketplace_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
network_profile = cls._schema_on_200.properties.network_profile
network_profile.egress_nat_ip = AAZListType(
serialized_name="egressNatIp",
)
network_profile.enable_egress_nat = AAZStrType(
serialized_name="enableEgressNat",
flags={"required": True},
)
network_profile.network_type = AAZStrType(
serialized_name="networkType",
flags={"required": True},
)
network_profile.public_ips = AAZListType(
serialized_name="publicIps",
flags={"required": True},
)
network_profile.vnet_configuration = AAZObjectType(
serialized_name="vnetConfiguration",
)
network_profile.vwan_configuration = AAZObjectType(
serialized_name="vwanConfiguration",
)
egress_nat_ip = cls._schema_on_200.properties.network_profile.egress_nat_ip
egress_nat_ip.Element = AAZObjectType()
_WaitHelper._build_schema_ip_address_read(egress_nat_ip.Element)
public_ips = cls._schema_on_200.properties.network_profile.public_ips
public_ips.Element = AAZObjectType()
_WaitHelper._build_schema_ip_address_read(public_ips.Element)
vnet_configuration = cls._schema_on_200.properties.network_profile.vnet_configuration
vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_WaitHelper._build_schema_ip_address_read(
vnet_configuration.ip_of_trust_subnet_for_udr)
vnet_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
flags={"required": True},
)
_WaitHelper._build_schema_ip_address_space_read(
vnet_configuration.trust_subnet)
vnet_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
flags={"required": True},
)
_WaitHelper._build_schema_ip_address_space_read(
vnet_configuration.un_trust_subnet)
vnet_configuration.vnet = AAZObjectType(
flags={"required": True},
)
_WaitHelper._build_schema_ip_address_space_read(
vnet_configuration.vnet)
vwan_configuration = cls._schema_on_200.properties.network_profile.vwan_configuration
vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_WaitHelper._build_schema_ip_address_read(
vwan_configuration.ip_of_trust_subnet_for_udr)
vwan_configuration.network_virtual_appliance_id = AAZStrType(
serialized_name="networkVirtualApplianceId",
)
vwan_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
)
_WaitHelper._build_schema_ip_address_space_read(
vwan_configuration.trust_subnet)
vwan_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
)
_WaitHelper._build_schema_ip_address_space_read(
vwan_configuration.un_trust_subnet)
vwan_configuration.v_hub = AAZObjectType(
serialized_name="vHub",
flags={"required": True},
)
_WaitHelper._build_schema_ip_address_space_read(
vwan_configuration.v_hub)
panorama_config = cls._schema_on_200.properties.panorama_config
panorama_config.cg_name = AAZStrType(
serialized_name="cgName",
flags={"read_only": True},
)
panorama_config.config_string = AAZStrType(
serialized_name="configString",
flags={"required": True},
)
panorama_config.dg_name = AAZStrType(
serialized_name="dgName",
flags={"read_only": True},
)
panorama_config.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
panorama_config.panorama_server = AAZStrType(
serialized_name="panoramaServer",
flags={"read_only": True},
)
panorama_config.panorama_server2 = AAZStrType(
serialized_name="panoramaServer2",
flags={"read_only": True},
)
panorama_config.tpl_name = AAZStrType(
serialized_name="tplName",
flags={"read_only": True},
)
panorama_config.vm_auth_key = AAZStrType(
serialized_name="vmAuthKey",
flags={"read_only": True},
)
plan_data = cls._schema_on_200.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"read_only": True},
)
plan_data.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
)
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 FirewallsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 40 | 3 | 37 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 376 | 33 | 343 | 44 | 326 | 0 | 142 | 37 | 132 | 2 | 1 | 1 | 11 |
10,341 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._update.Update.FirewallsGet
|
class FirewallsGet(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
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_firewall_resource_read(
cls._schema_on_200)
return cls._schema_on_200
|
class FirewallsGet(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 |
10,342 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._update.Update.FirewallsCreateOrUpdate
|
class FirewallsCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
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_firewall_resource_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class FirewallsCreateOrUpdate(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 |
10,343 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_support_info.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._show_support_info.ShowSupportInfo.FirewallsGetSupportInfo
|
class FirewallsGetSupportInfo(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getSupportInfo",
**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(
"firewallName", self.ctx.args.firewall_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(
"email", self.ctx.args.email,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.account_id = AAZStrType(
serialized_name="accountId",
)
_schema_on_200.account_registered = AAZStrType(
serialized_name="accountRegistered",
)
_schema_on_200.free_trial = AAZStrType(
serialized_name="freeTrial",
)
_schema_on_200.free_trial_credit_left = AAZIntType(
serialized_name="freeTrialCreditLeft",
)
_schema_on_200.free_trial_days_left = AAZIntType(
serialized_name="freeTrialDaysLeft",
)
_schema_on_200.help_url = AAZStrType(
serialized_name="helpURL",
)
_schema_on_200.product_serial = AAZStrType(
serialized_name="productSerial",
)
_schema_on_200.product_sku = AAZStrType(
serialized_name="productSku",
)
_schema_on_200.register_url = AAZStrType(
serialized_name="registerURL",
)
_schema_on_200.support_url = AAZStrType(
serialized_name="supportURL",
)
_schema_on_200.user_domain_supported = AAZStrType(
serialized_name="userDomainSupported",
)
_schema_on_200.user_registered = AAZStrType(
serialized_name="userRegistered",
)
return cls._schema_on_200
|
class FirewallsGetSupportInfo(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 11 | 0 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 122 | 14 | 108 | 26 | 91 | 0 | 45 | 19 | 35 | 2 | 1 | 1 | 11 |
10,344 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_log_profile.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._show_log_profile.ShowLogProfile.FirewallsGetLogProfile
|
class FirewallsGetLogProfile(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getLogProfile",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
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.application_insights = AAZObjectType(
serialized_name="applicationInsights",
)
_schema_on_200.common_destination = AAZObjectType(
serialized_name="commonDestination",
)
_ShowLogProfileHelper._build_schema_log_destination_read(
_schema_on_200.common_destination)
_schema_on_200.decrypt_log_destination = AAZObjectType(
serialized_name="decryptLogDestination",
)
_ShowLogProfileHelper._build_schema_log_destination_read(
_schema_on_200.decrypt_log_destination)
_schema_on_200.log_option = AAZStrType(
serialized_name="logOption",
)
_schema_on_200.log_type = AAZStrType(
serialized_name="logType",
)
_schema_on_200.threat_log_destination = AAZObjectType(
serialized_name="threatLogDestination",
)
_ShowLogProfileHelper._build_schema_log_destination_read(
_schema_on_200.threat_log_destination)
_schema_on_200.traffic_log_destination = AAZObjectType(
serialized_name="trafficLogDestination",
)
_ShowLogProfileHelper._build_schema_log_destination_read(
_schema_on_200.traffic_log_destination)
application_insights = cls._schema_on_200.application_insights
application_insights.id = AAZStrType()
application_insights.key = AAZStrType()
return cls._schema_on_200
|
class FirewallsGetLogProfile(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 112 | 15 | 97 | 27 | 80 | 0 | 47 | 20 | 37 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._list_security_service.ListSecurityService.LocalRulestacksListSecurityServices
|
class LocalRulestacksListSecurityServices(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listSecurityServices",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"skip", self.ctx.args.skip,
),
**self.serialize_query_param(
"top", self.ctx.args.top,
),
**self.serialize_query_param(
"type", self.ctx.args.type,
required=True,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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 = AAZObjectType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.entry = AAZListType(
flags={"required": True},
)
value.type = AAZStrType()
entry = cls._schema_on_200.value.entry
entry.Element = AAZObjectType()
_element = cls._schema_on_200.value.entry.Element
_element.description = AAZStrType()
_element.name = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class LocalRulestacksListSecurityServices(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 114 | 17 | 97 | 29 | 80 | 0 | 43 | 22 | 33 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._show.Show.FirewallsGet
|
class FirewallsGet(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.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()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.properties
properties.associated_rulestack = AAZObjectType(
serialized_name="associatedRulestack",
)
properties.dns_settings = AAZObjectType(
serialized_name="dnsSettings",
flags={"required": True},
)
properties.front_end_settings = AAZListType(
serialized_name="frontEndSettings",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
flags={"required": True},
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.panorama_config = AAZObjectType(
serialized_name="panoramaConfig",
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
associated_rulestack = cls._schema_on_200.properties.associated_rulestack
associated_rulestack.location = AAZStrType()
associated_rulestack.resource_id = AAZStrType(
serialized_name="resourceId",
)
associated_rulestack.rulestack_id = AAZStrType(
serialized_name="rulestackId",
)
dns_settings = cls._schema_on_200.properties.dns_settings
dns_settings.dns_servers = AAZListType(
serialized_name="dnsServers",
)
dns_settings.enable_dns_proxy = AAZStrType(
serialized_name="enableDnsProxy",
)
dns_settings.enabled_dns_type = AAZStrType(
serialized_name="enabledDnsType",
)
dns_servers = cls._schema_on_200.properties.dns_settings.dns_servers
dns_servers.Element = AAZObjectType()
_ShowHelper._build_schema_ip_address_read(dns_servers.Element)
front_end_settings = cls._schema_on_200.properties.front_end_settings
front_end_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.front_end_settings.Element
_element.backend_configuration = AAZObjectType(
serialized_name="backendConfiguration",
flags={"required": True},
)
_ShowHelper._build_schema_endpoint_configuration_read(
_element.backend_configuration)
_element.frontend_configuration = AAZObjectType(
serialized_name="frontendConfiguration",
flags={"required": True},
)
_ShowHelper._build_schema_endpoint_configuration_read(
_element.frontend_configuration)
_element.name = AAZStrType(
flags={"required": True},
)
_element.protocol = AAZStrType(
flags={"required": True},
)
marketplace_details = cls._schema_on_200.properties.marketplace_details
marketplace_details.marketplace_subscription_id = AAZStrType(
serialized_name="marketplaceSubscriptionId",
flags={"read_only": True},
)
marketplace_details.marketplace_subscription_status = AAZStrType(
serialized_name="marketplaceSubscriptionStatus",
)
marketplace_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
marketplace_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
network_profile = cls._schema_on_200.properties.network_profile
network_profile.egress_nat_ip = AAZListType(
serialized_name="egressNatIp",
)
network_profile.enable_egress_nat = AAZStrType(
serialized_name="enableEgressNat",
flags={"required": True},
)
network_profile.network_type = AAZStrType(
serialized_name="networkType",
flags={"required": True},
)
network_profile.public_ips = AAZListType(
serialized_name="publicIps",
flags={"required": True},
)
network_profile.vnet_configuration = AAZObjectType(
serialized_name="vnetConfiguration",
)
network_profile.vwan_configuration = AAZObjectType(
serialized_name="vwanConfiguration",
)
egress_nat_ip = cls._schema_on_200.properties.network_profile.egress_nat_ip
egress_nat_ip.Element = AAZObjectType()
_ShowHelper._build_schema_ip_address_read(egress_nat_ip.Element)
public_ips = cls._schema_on_200.properties.network_profile.public_ips
public_ips.Element = AAZObjectType()
_ShowHelper._build_schema_ip_address_read(public_ips.Element)
vnet_configuration = cls._schema_on_200.properties.network_profile.vnet_configuration
vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ShowHelper._build_schema_ip_address_read(
vnet_configuration.ip_of_trust_subnet_for_udr)
vnet_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
flags={"required": True},
)
_ShowHelper._build_schema_ip_address_space_read(
vnet_configuration.trust_subnet)
vnet_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
flags={"required": True},
)
_ShowHelper._build_schema_ip_address_space_read(
vnet_configuration.un_trust_subnet)
vnet_configuration.vnet = AAZObjectType(
flags={"required": True},
)
_ShowHelper._build_schema_ip_address_space_read(
vnet_configuration.vnet)
vwan_configuration = cls._schema_on_200.properties.network_profile.vwan_configuration
vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ShowHelper._build_schema_ip_address_read(
vwan_configuration.ip_of_trust_subnet_for_udr)
vwan_configuration.network_virtual_appliance_id = AAZStrType(
serialized_name="networkVirtualApplianceId",
)
vwan_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
)
_ShowHelper._build_schema_ip_address_space_read(
vwan_configuration.trust_subnet)
vwan_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
)
_ShowHelper._build_schema_ip_address_space_read(
vwan_configuration.un_trust_subnet)
vwan_configuration.v_hub = AAZObjectType(
serialized_name="vHub",
flags={"required": True},
)
_ShowHelper._build_schema_ip_address_space_read(
vwan_configuration.v_hub)
panorama_config = cls._schema_on_200.properties.panorama_config
panorama_config.cg_name = AAZStrType(
serialized_name="cgName",
flags={"read_only": True},
)
panorama_config.config_string = AAZStrType(
serialized_name="configString",
flags={"required": True},
)
panorama_config.dg_name = AAZStrType(
serialized_name="dgName",
flags={"read_only": True},
)
panorama_config.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
panorama_config.panorama_server = AAZStrType(
serialized_name="panoramaServer",
flags={"read_only": True},
)
panorama_config.panorama_server2 = AAZStrType(
serialized_name="panoramaServer2",
flags={"read_only": True},
)
panorama_config.tpl_name = AAZStrType(
serialized_name="tplName",
flags={"read_only": True},
)
panorama_config.vm_auth_key = AAZStrType(
serialized_name="vmAuthKey",
flags={"read_only": True},
)
plan_data = cls._schema_on_200.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"read_only": True},
)
plan_data.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
)
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 FirewallsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 40 | 3 | 37 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 376 | 33 | 343 | 44 | 326 | 0 | 142 | 37 | 132 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._revert.Revert.LocalRulestacksRevert
|
class LocalRulestacksRevert(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 [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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/revert",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
def on_204(self, session):
pass
|
class LocalRulestacksRevert(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
| 13 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 56 | 8 | 48 | 18 | 35 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_support_info.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._show_support_info.ShowSupportInfo.LocalRulestacksGetSupportInfo
|
class LocalRulestacksGetSupportInfo(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getSupportInfo",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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(
"email", self.ctx.args.email,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.account_id = AAZStrType(
serialized_name="accountId",
)
_schema_on_200.account_registered = AAZStrType(
serialized_name="accountRegistered",
)
_schema_on_200.free_trial = AAZStrType(
serialized_name="freeTrial",
)
_schema_on_200.free_trial_credit_left = AAZIntType(
serialized_name="freeTrialCreditLeft",
)
_schema_on_200.free_trial_days_left = AAZIntType(
serialized_name="freeTrialDaysLeft",
)
_schema_on_200.help_url = AAZStrType(
serialized_name="helpURL",
)
_schema_on_200.product_serial = AAZStrType(
serialized_name="productSerial",
)
_schema_on_200.product_sku = AAZStrType(
serialized_name="productSku",
)
_schema_on_200.register_url = AAZStrType(
serialized_name="registerURL",
)
_schema_on_200.support_url = AAZStrType(
serialized_name="supportURL",
)
_schema_on_200.user_domain_supported = AAZStrType(
serialized_name="userDomainSupported",
)
_schema_on_200.user_registered = AAZStrType(
serialized_name="userRegistered",
)
return cls._schema_on_200
|
class LocalRulestacksGetSupportInfo(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 11 | 0 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 122 | 14 | 108 | 26 | 91 | 0 | 45 | 19 | 35 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._reset_counter.ResetCounter.LocalRulesResetCounters
|
class LocalRulesResetCounters(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/resetCounters",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"priority", self.ctx.args.priority,
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(
"firewallName", self.ctx.args.firewall_name,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.firewall_name = AAZStrType(
serialized_name="firewallName",
)
_schema_on_200.priority = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.rule_list_name = AAZStrType(
serialized_name="ruleListName",
)
_schema_on_200.rule_name = AAZStrType(
serialized_name="ruleName",
)
_schema_on_200.rule_stack_name = AAZStrType(
serialized_name="ruleStackName",
)
return cls._schema_on_200
|
class LocalRulesResetCounters(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 105 | 14 | 91 | 26 | 74 | 0 | 38 | 19 | 28 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._refresh_counter.RefreshCounter.LocalRulesRefreshCounters
|
class LocalRulesRefreshCounters(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 [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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/refreshCounters",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"priority", self.ctx.args.priority,
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(
"firewallName", self.ctx.args.firewall_name,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
required=True,
),
}
return parameters
def on_204(self, session):
pass
|
class LocalRulesRefreshCounters(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
| 13 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 63 | 8 | 55 | 18 | 42 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._list.List.LocalRulesListByLocalRulestacks
|
class LocalRulesListByLocalRulestacks(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.action_type = AAZStrType(
serialized_name="actionType",
)
properties.applications = AAZListType()
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.category = AAZObjectType()
properties.decryption_rule_type = AAZStrType(
serialized_name="decryptionRuleType",
)
properties.description = AAZStrType()
properties.destination = AAZObjectType()
properties.enable_logging = AAZStrType(
serialized_name="enableLogging",
)
properties.etag = AAZStrType()
properties.inbound_inspection_certificate = AAZStrType(
serialized_name="inboundInspectionCertificate",
)
properties.negate_destination = AAZStrType(
serialized_name="negateDestination",
)
properties.negate_source = AAZStrType(
serialized_name="negateSource",
)
properties.priority = AAZIntType(
flags={"read_only": True},
)
properties.protocol = AAZStrType()
properties.protocol_port_list = AAZListType(
serialized_name="protocolPortList",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.rule_name = AAZStrType(
serialized_name="ruleName",
flags={"required": True},
)
properties.rule_state = AAZStrType(
serialized_name="ruleState",
)
properties.source = AAZObjectType()
properties.tags = AAZListType()
applications = cls._schema_on_200.value.Element.properties.applications
applications.Element = AAZStrType()
category = cls._schema_on_200.value.Element.properties.category
category.feeds = AAZListType(
flags={"required": True},
)
category.url_custom = AAZListType(
serialized_name="urlCustom",
flags={"required": True},
)
feeds = cls._schema_on_200.value.Element.properties.category.feeds
feeds.Element = AAZStrType()
url_custom = cls._schema_on_200.value.Element.properties.category.url_custom
url_custom.Element = AAZStrType()
destination = cls._schema_on_200.value.Element.properties.destination
destination.cidrs = AAZListType()
destination.countries = AAZListType()
destination.feeds = AAZListType()
destination.fqdn_lists = AAZListType(
serialized_name="fqdnLists",
)
destination.prefix_lists = AAZListType(
serialized_name="prefixLists",
)
cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs
cidrs.Element = AAZStrType()
countries = cls._schema_on_200.value.Element.properties.destination.countries
countries.Element = AAZStrType()
feeds = cls._schema_on_200.value.Element.properties.destination.feeds
feeds.Element = AAZStrType()
fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists
fqdn_lists.Element = AAZStrType()
prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists
prefix_lists.Element = AAZStrType()
protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list
protocol_port_list.Element = AAZStrType()
source = cls._schema_on_200.value.Element.properties.source
source.cidrs = AAZListType()
source.countries = AAZListType()
source.feeds = AAZListType()
source.prefix_lists = AAZListType(
serialized_name="prefixLists",
)
cidrs = cls._schema_on_200.value.Element.properties.source.cidrs
cidrs.Element = AAZStrType()
countries = cls._schema_on_200.value.Element.properties.source.countries
countries.Element = AAZStrType()
feeds = cls._schema_on_200.value.Element.properties.source.feeds
feeds.Element = AAZStrType()
prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists
prefix_lists.Element = AAZStrType()
tags = cls._schema_on_200.value.Element.properties.tags
tags.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.tags.Element
_element.key = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class LocalRulesListByLocalRulestacks(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 | 26 | 3 | 23 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 255 | 36 | 219 | 42 | 202 | 0 | 116 | 35 | 106 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._delete.Delete.LocalRulesDelete
|
class LocalRulesDelete(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"priority", self.ctx.args.priority,
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", "2022-08-29",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class LocalRulesDelete(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 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._create.Create.LocalRulesCreateOrUpdate
|
class LocalRulesCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"priority", self.ctx.args.priority,
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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("actionType", AAZStrType, ".action_type")
properties.set_prop(
"applications", AAZListType, ".applications")
properties.set_prop(
"auditComment", AAZStrType, ".audit_comment")
properties.set_prop("category", AAZObjectType, ".category")
properties.set_prop("decryptionRuleType",
AAZStrType, ".decryption_rule_type")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop(
"destination", AAZObjectType, ".destination")
properties.set_prop(
"enableLogging", AAZStrType, ".enable_logging")
properties.set_prop("etag", AAZStrType, ".etag")
properties.set_prop(
"inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate")
properties.set_prop("negateDestination",
AAZStrType, ".negate_destination")
properties.set_prop(
"negateSource", AAZStrType, ".negate_source")
properties.set_prop("protocol", AAZStrType, ".protocol")
properties.set_prop("protocolPortList",
AAZListType, ".protocol_port_list")
properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("ruleState", AAZStrType, ".rule_state")
properties.set_prop("source", AAZObjectType, ".source")
properties.set_prop("tags", AAZListType, ".tags")
applications = _builder.get(".properties.applications")
if applications is not None:
applications.set_elements(AAZStrType, ".")
category = _builder.get(".properties.category")
if category is not None:
category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={
"flags": {"required": True}})
category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={
"flags": {"required": True}})
feeds = _builder.get(".properties.category.feeds")
if feeds is not None:
feeds.set_elements(AAZStrType, ".")
url_custom = _builder.get(".properties.category.urlCustom")
if url_custom is not None:
url_custom.set_elements(AAZStrType, ".")
destination = _builder.get(".properties.destination")
if destination is not None:
destination.set_prop("cidrs", AAZListType, ".cidrs")
destination.set_prop("countries", AAZListType, ".countries")
destination.set_prop("feeds", AAZListType, ".feeds")
destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists")
destination.set_prop(
"prefixLists", AAZListType, ".prefix_lists")
cidrs = _builder.get(".properties.destination.cidrs")
if cidrs is not None:
cidrs.set_elements(AAZStrType, ".")
countries = _builder.get(".properties.destination.countries")
if countries is not None:
countries.set_elements(AAZStrType, ".")
feeds = _builder.get(".properties.destination.feeds")
if feeds is not None:
feeds.set_elements(AAZStrType, ".")
fqdn_lists = _builder.get(".properties.destination.fqdnLists")
if fqdn_lists is not None:
fqdn_lists.set_elements(AAZStrType, ".")
prefix_lists = _builder.get(".properties.destination.prefixLists")
if prefix_lists is not None:
prefix_lists.set_elements(AAZStrType, ".")
protocol_port_list = _builder.get(".properties.protocolPortList")
if protocol_port_list is not None:
protocol_port_list.set_elements(AAZStrType, ".")
source = _builder.get(".properties.source")
if source is not None:
source.set_prop("cidrs", AAZListType, ".cidrs")
source.set_prop("countries", AAZListType, ".countries")
source.set_prop("feeds", AAZListType, ".feeds")
source.set_prop("prefixLists", AAZListType, ".prefix_lists")
cidrs = _builder.get(".properties.source.cidrs")
if cidrs is not None:
cidrs.set_elements(AAZStrType, ".")
countries = _builder.get(".properties.source.countries")
if countries is not None:
countries.set_elements(AAZStrType, ".")
feeds = _builder.get(".properties.source.feeds")
if feeds is not None:
feeds.set_elements(AAZStrType, ".")
prefix_lists = _builder.get(".properties.source.prefixLists")
if prefix_lists is not None:
prefix_lists.set_elements(AAZStrType, ".")
tags = _builder.get(".properties.tags")
if tags is not None:
tags.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.tags[]")
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}})
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.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.action_type = AAZStrType(
serialized_name="actionType",
)
properties.applications = AAZListType()
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.category = AAZObjectType()
properties.decryption_rule_type = AAZStrType(
serialized_name="decryptionRuleType",
)
properties.description = AAZStrType()
properties.destination = AAZObjectType()
properties.enable_logging = AAZStrType(
serialized_name="enableLogging",
)
properties.etag = AAZStrType()
properties.inbound_inspection_certificate = AAZStrType(
serialized_name="inboundInspectionCertificate",
)
properties.negate_destination = AAZStrType(
serialized_name="negateDestination",
)
properties.negate_source = AAZStrType(
serialized_name="negateSource",
)
properties.priority = AAZIntType(
flags={"read_only": True},
)
properties.protocol = AAZStrType()
properties.protocol_port_list = AAZListType(
serialized_name="protocolPortList",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.rule_name = AAZStrType(
serialized_name="ruleName",
flags={"required": True},
)
properties.rule_state = AAZStrType(
serialized_name="ruleState",
)
properties.source = AAZObjectType()
properties.tags = AAZListType()
applications = cls._schema_on_200_201.properties.applications
applications.Element = AAZStrType()
category = cls._schema_on_200_201.properties.category
category.feeds = AAZListType(
flags={"required": True},
)
category.url_custom = AAZListType(
serialized_name="urlCustom",
flags={"required": True},
)
feeds = cls._schema_on_200_201.properties.category.feeds
feeds.Element = AAZStrType()
url_custom = cls._schema_on_200_201.properties.category.url_custom
url_custom.Element = AAZStrType()
destination = cls._schema_on_200_201.properties.destination
destination.cidrs = AAZListType()
destination.countries = AAZListType()
destination.feeds = AAZListType()
destination.fqdn_lists = AAZListType(
serialized_name="fqdnLists",
)
destination.prefix_lists = AAZListType(
serialized_name="prefixLists",
)
cidrs = cls._schema_on_200_201.properties.destination.cidrs
cidrs.Element = AAZStrType()
countries = cls._schema_on_200_201.properties.destination.countries
countries.Element = AAZStrType()
feeds = cls._schema_on_200_201.properties.destination.feeds
feeds.Element = AAZStrType()
fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists
fqdn_lists.Element = AAZStrType()
prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists
prefix_lists.Element = AAZStrType()
protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list
protocol_port_list.Element = AAZStrType()
source = cls._schema_on_200_201.properties.source
source.cidrs = AAZListType()
source.countries = AAZListType()
source.feeds = AAZListType()
source.prefix_lists = AAZListType(
serialized_name="prefixLists",
)
cidrs = cls._schema_on_200_201.properties.source.cidrs
cidrs.Element = AAZStrType()
countries = cls._schema_on_200_201.properties.source.countries
countries.Element = AAZStrType()
feeds = cls._schema_on_200_201.properties.source.feeds
feeds.Element = AAZStrType()
prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists
prefix_lists.Element = AAZStrType()
tags = cls._schema_on_200_201.properties.tags
tags.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.tags.Element
_element.key = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200_201
|
class LocalRulesCreateOrUpdate(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 | 36 | 4 | 31 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 380 | 55 | 325 | 59 | 306 | 0 | 200 | 50 | 189 | 20 | 1 | 1 | 32 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_wait.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.fqdnlist._wait.Wait.FqdnListLocalRulestackGet
|
class FqdnListLocalRulestackGet(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.fqdn_list = AAZListType(
serialized_name="fqdnList",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
fqdn_list = cls._schema_on_200.properties.fqdn_list
fqdn_list.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 FqdnListLocalRulestackGet(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 | 140 | 17 | 123 | 29 | 106 | 0 | 53 | 22 | 43 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.fqdnlist._list.List.FqdnListLocalRulestackListByLocalRulestacks
|
class FqdnListLocalRulestackListByLocalRulestacks(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.fqdn_list = AAZListType(
serialized_name="fqdnList",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
fqdn_list = cls._schema_on_200.value.Element.properties.fqdn_list
fqdn_list.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 FqdnListLocalRulestackListByLocalRulestacks(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 | 147 | 19 | 128 | 31 | 111 | 0 | 58 | 24 | 48 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.fqdnlist._delete.Delete.FqdnListLocalRulestackDelete
|
class FqdnListLocalRulestackDelete(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class FqdnListLocalRulestackDelete(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 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.fqdnlist._create.Create.FqdnListLocalRulestackCreateOrUpdate
|
class FqdnListLocalRulestackCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"auditComment", AAZStrType, ".audit_comment")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("etag", AAZStrType, ".etag")
properties.set_prop("fqdnList", AAZListType, ".fqdn_list", typ_kwargs={
"flags": {"required": True}})
fqdn_list = _builder.get(".properties.fqdnList")
if fqdn_list is not None:
fqdn_list.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(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.fqdn_list = AAZListType(
serialized_name="fqdnList",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
fqdn_list = cls._schema_on_200_201.properties.fqdn_list
fqdn_list.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 FqdnListLocalRulestackCreateOrUpdate(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 | 16 | 1 | 15 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 181 | 21 | 160 | 35 | 141 | 0 | 68 | 26 | 57 | 3 | 1 | 1 | 15 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_wait.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.certificate._wait.Wait.CertificateObjectLocalRulestackGet
|
class CertificateObjectLocalRulestackGet(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.certificate_self_signed = AAZStrType(
serialized_name="certificateSelfSigned",
flags={"required": True},
)
properties.certificate_signer_resource_id = AAZStrType(
serialized_name="certificateSignerResourceId",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
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 CertificateObjectLocalRulestackGet(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 | 140 | 16 | 124 | 28 | 107 | 0 | 52 | 21 | 42 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.certificate._list.List.CertificateObjectLocalRulestackListByLocalRulestacks
|
class CertificateObjectLocalRulestackListByLocalRulestacks(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.certificate_self_signed = AAZStrType(
serialized_name="certificateSelfSigned",
flags={"required": True},
)
properties.certificate_signer_resource_id = AAZStrType(
serialized_name="certificateSignerResourceId",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
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 CertificateObjectLocalRulestackListByLocalRulestacks(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 | 147 | 18 | 129 | 30 | 112 | 0 | 57 | 23 | 47 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.certificate._delete.Delete.CertificateObjectLocalRulestackDelete
|
class CertificateObjectLocalRulestackDelete(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class CertificateObjectLocalRulestackDelete(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 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.certificate._create.Create.CertificateObjectLocalRulestackCreateOrUpdate
|
class CertificateObjectLocalRulestackCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"name", 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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"auditComment", AAZStrType, ".audit_comment")
properties.set_prop("certificateSelfSigned", AAZStrType, ".certificate_self_signed", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"certificateSignerResourceId", AAZStrType, ".certificate_signer_id")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("etag", AAZStrType, ".etag")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.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.audit_comment = AAZStrType(
serialized_name="auditComment",
)
properties.certificate_self_signed = AAZStrType(
serialized_name="certificateSelfSigned",
flags={"required": True},
)
properties.certificate_signer_resource_id = AAZStrType(
serialized_name="certificateSignerResourceId",
)
properties.description = AAZStrType()
properties.etag = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
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 CertificateObjectLocalRulestackCreateOrUpdate(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 178 | 19 | 159 | 33 | 140 | 0 | 65 | 24 | 54 | 3 | 1 | 1 | 14 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_wait.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._wait.Wait.LocalRulestacksGet
|
class LocalRulestacksGet(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.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()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.properties
properties.associated_subscriptions = AAZListType(
serialized_name="associatedSubscriptions",
)
properties.default_mode = AAZStrType(
serialized_name="defaultMode",
)
properties.description = AAZStrType()
properties.min_app_id_version = AAZStrType(
serialized_name="minAppIdVersion",
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.pan_location = AAZStrType(
serialized_name="panLocation",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.scope = AAZStrType()
properties.security_services = AAZObjectType(
serialized_name="securityServices",
)
associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions
associated_subscriptions.Element = AAZStrType()
security_services = cls._schema_on_200.properties.security_services
security_services.anti_spyware_profile = AAZStrType(
serialized_name="antiSpywareProfile",
)
security_services.anti_virus_profile = AAZStrType(
serialized_name="antiVirusProfile",
)
security_services.dns_subscription = AAZStrType(
serialized_name="dnsSubscription",
)
security_services.file_blocking_profile = AAZStrType(
serialized_name="fileBlockingProfile",
)
security_services.outbound_trust_certificate = AAZStrType(
serialized_name="outboundTrustCertificate",
)
security_services.outbound_un_trust_certificate = AAZStrType(
serialized_name="outboundUnTrustCertificate",
)
security_services.url_filtering_profile = AAZStrType(
serialized_name="urlFilteringProfile",
)
security_services.vulnerability_profile = AAZStrType(
serialized_name="vulnerabilityProfile",
)
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 LocalRulestacksGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 21 | 1 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 208 | 22 | 186 | 34 | 169 | 0 | 81 | 27 | 71 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._update.Update.LocalRulestacksGet
|
class LocalRulestacksGet(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
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_local_rulestack_resource_read(
cls._schema_on_200)
return cls._schema_on_200
|
class LocalRulestacksGet(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 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._update.Update.LocalRulestacksCreateOrUpdate
|
class LocalRulestacksCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
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_local_rulestack_resource_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class LocalRulestacksCreateOrUpdate(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 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
_elements = _builder.get(".identity.userAssignedIdentities{}")
if _elements is not None:
_elements.set_prop("clientId", AAZStrType, ".client_id")
_elements.set_prop("principalId", AAZStrType, ".principal_id")
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 | 15 | 3 | 13 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 33 | 7 | 26 | 8 | 23 | 0 | 22 | 8 | 19 | 5 | 1 | 1 | 6 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_change_log.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack._show_change_log.ShowChangeLog.LocalRulestacksGetChangeLog
|
class LocalRulestacksGetChangeLog(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getChangeLog",
**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(
"localRulestackName", self.ctx.args.local_rulestack_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", "2022-08-29",
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.changes = AAZListType(
flags={"required": True},
)
_schema_on_200.last_committed = AAZStrType(
serialized_name="lastCommitted",
)
_schema_on_200.last_modified = AAZStrType(
serialized_name="lastModified",
)
changes = cls._schema_on_200.changes
changes.Element = AAZStrType()
return cls._schema_on_200
|
class LocalRulestacksGetChangeLog(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 | 1 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 95 | 15 | 80 | 27 | 63 | 0 | 38 | 20 | 28 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._save_log_profile.SaveLogProfile.FirewallsSaveLogProfile
|
class FirewallsSaveLogProfile(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 [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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/saveLogProfile",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
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": {"client_flatten": True}}
)
_builder.set_prop("applicationInsights",
AAZObjectType, ".application_insights")
_SaveLogProfileHelper._build_schema_log_destination_create(
_builder.set_prop("commonDestination", AAZObjectType, ".common_destination"))
_SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop(
"decryptLogDestination", AAZObjectType, ".decrypt_log_destination"))
_builder.set_prop("logOption", AAZStrType, ".log_option")
_builder.set_prop("logType", AAZStrType, ".log_type")
_SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop(
"threatLogDestination", AAZObjectType, ".threat_log_destination"))
_SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop(
"trafficLogDestination", AAZObjectType, ".traffic_log_destination"))
application_insights = _builder.get(".applicationInsights")
if application_insights is not None:
application_insights.set_prop("id", AAZStrType, ".id")
application_insights.set_prop("key", AAZStrType, ".key")
return self.serialize_content(_content_value)
def on_204(self, session):
pass
|
class FirewallsSaveLogProfile(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_204(self, session):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 9 | 9 | 87 | 12 | 75 | 25 | 58 | 0 | 39 | 18 | 29 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._list.List.FirewallsListBySubscription
|
class FirewallsListBySubscription(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/PaloAltoNetworks.Cloudngfw/firewalls",
**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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.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()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.value.Element.properties
properties.associated_rulestack = AAZObjectType(
serialized_name="associatedRulestack",
)
properties.dns_settings = AAZObjectType(
serialized_name="dnsSettings",
flags={"required": True},
)
properties.front_end_settings = AAZListType(
serialized_name="frontEndSettings",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
flags={"required": True},
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.panorama_config = AAZObjectType(
serialized_name="panoramaConfig",
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
associated_rulestack = cls._schema_on_200.value.Element.properties.associated_rulestack
associated_rulestack.location = AAZStrType()
associated_rulestack.resource_id = AAZStrType(
serialized_name="resourceId",
)
associated_rulestack.rulestack_id = AAZStrType(
serialized_name="rulestackId",
)
dns_settings = cls._schema_on_200.value.Element.properties.dns_settings
dns_settings.dns_servers = AAZListType(
serialized_name="dnsServers",
)
dns_settings.enable_dns_proxy = AAZStrType(
serialized_name="enableDnsProxy",
)
dns_settings.enabled_dns_type = AAZStrType(
serialized_name="enabledDnsType",
)
dns_servers = cls._schema_on_200.value.Element.properties.dns_settings.dns_servers
dns_servers.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(dns_servers.Element)
front_end_settings = cls._schema_on_200.value.Element.properties.front_end_settings
front_end_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.front_end_settings.Element
_element.backend_configuration = AAZObjectType(
serialized_name="backendConfiguration",
flags={"required": True},
)
_ListHelper._build_schema_endpoint_configuration_read(
_element.backend_configuration)
_element.frontend_configuration = AAZObjectType(
serialized_name="frontendConfiguration",
flags={"required": True},
)
_ListHelper._build_schema_endpoint_configuration_read(
_element.frontend_configuration)
_element.name = AAZStrType(
flags={"required": True},
)
_element.protocol = AAZStrType(
flags={"required": True},
)
marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details
marketplace_details.marketplace_subscription_id = AAZStrType(
serialized_name="marketplaceSubscriptionId",
flags={"read_only": True},
)
marketplace_details.marketplace_subscription_status = AAZStrType(
serialized_name="marketplaceSubscriptionStatus",
)
marketplace_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
marketplace_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
network_profile = cls._schema_on_200.value.Element.properties.network_profile
network_profile.egress_nat_ip = AAZListType(
serialized_name="egressNatIp",
)
network_profile.enable_egress_nat = AAZStrType(
serialized_name="enableEgressNat",
flags={"required": True},
)
network_profile.network_type = AAZStrType(
serialized_name="networkType",
flags={"required": True},
)
network_profile.public_ips = AAZListType(
serialized_name="publicIps",
flags={"required": True},
)
network_profile.vnet_configuration = AAZObjectType(
serialized_name="vnetConfiguration",
)
network_profile.vwan_configuration = AAZObjectType(
serialized_name="vwanConfiguration",
)
egress_nat_ip = cls._schema_on_200.value.Element.properties.network_profile.egress_nat_ip
egress_nat_ip.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(egress_nat_ip.Element)
public_ips = cls._schema_on_200.value.Element.properties.network_profile.public_ips
public_ips.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(public_ips.Element)
vnet_configuration = cls._schema_on_200.value.Element.properties.network_profile.vnet_configuration
vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ListHelper._build_schema_ip_address_read(
vnet_configuration.ip_of_trust_subnet_for_udr)
vnet_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.trust_subnet)
vnet_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.un_trust_subnet)
vnet_configuration.vnet = AAZObjectType(
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.vnet)
vwan_configuration = cls._schema_on_200.value.Element.properties.network_profile.vwan_configuration
vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ListHelper._build_schema_ip_address_read(
vwan_configuration.ip_of_trust_subnet_for_udr)
vwan_configuration.network_virtual_appliance_id = AAZStrType(
serialized_name="networkVirtualApplianceId",
)
vwan_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.trust_subnet)
vwan_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.un_trust_subnet)
vwan_configuration.v_hub = AAZObjectType(
serialized_name="vHub",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.v_hub)
panorama_config = cls._schema_on_200.value.Element.properties.panorama_config
panorama_config.cg_name = AAZStrType(
serialized_name="cgName",
flags={"read_only": True},
)
panorama_config.config_string = AAZStrType(
serialized_name="configString",
flags={"required": True},
)
panorama_config.dg_name = AAZStrType(
serialized_name="dgName",
flags={"read_only": True},
)
panorama_config.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
panorama_config.panorama_server = AAZStrType(
serialized_name="panoramaServer",
flags={"read_only": True},
)
panorama_config.panorama_server2 = AAZStrType(
serialized_name="panoramaServer2",
flags={"read_only": True},
)
panorama_config.tpl_name = AAZStrType(
serialized_name="tplName",
flags={"read_only": True},
)
panorama_config.vm_auth_key = AAZStrType(
serialized_name="vmAuthKey",
flags={"read_only": True},
)
plan_data = cls._schema_on_200.value.Element.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"read_only": True},
)
plan_data.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
)
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 FirewallsListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 40 | 3 | 37 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 379 | 35 | 344 | 45 | 327 | 0 | 147 | 38 | 137 | 2 | 1 | 1 | 11 |
10,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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._list.List.FirewallsListByResourceGroup
|
class FirewallsListByResourceGroup(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/PaloAltoNetworks.Cloudngfw/firewalls",
**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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.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()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200.value.Element.properties
properties.associated_rulestack = AAZObjectType(
serialized_name="associatedRulestack",
)
properties.dns_settings = AAZObjectType(
serialized_name="dnsSettings",
flags={"required": True},
)
properties.front_end_settings = AAZListType(
serialized_name="frontEndSettings",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
flags={"required": True},
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.panorama_config = AAZObjectType(
serialized_name="panoramaConfig",
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
associated_rulestack = cls._schema_on_200.value.Element.properties.associated_rulestack
associated_rulestack.location = AAZStrType()
associated_rulestack.resource_id = AAZStrType(
serialized_name="resourceId",
)
associated_rulestack.rulestack_id = AAZStrType(
serialized_name="rulestackId",
)
dns_settings = cls._schema_on_200.value.Element.properties.dns_settings
dns_settings.dns_servers = AAZListType(
serialized_name="dnsServers",
)
dns_settings.enable_dns_proxy = AAZStrType(
serialized_name="enableDnsProxy",
)
dns_settings.enabled_dns_type = AAZStrType(
serialized_name="enabledDnsType",
)
dns_servers = cls._schema_on_200.value.Element.properties.dns_settings.dns_servers
dns_servers.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(dns_servers.Element)
front_end_settings = cls._schema_on_200.value.Element.properties.front_end_settings
front_end_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.front_end_settings.Element
_element.backend_configuration = AAZObjectType(
serialized_name="backendConfiguration",
flags={"required": True},
)
_ListHelper._build_schema_endpoint_configuration_read(
_element.backend_configuration)
_element.frontend_configuration = AAZObjectType(
serialized_name="frontendConfiguration",
flags={"required": True},
)
_ListHelper._build_schema_endpoint_configuration_read(
_element.frontend_configuration)
_element.name = AAZStrType(
flags={"required": True},
)
_element.protocol = AAZStrType(
flags={"required": True},
)
marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details
marketplace_details.marketplace_subscription_id = AAZStrType(
serialized_name="marketplaceSubscriptionId",
flags={"read_only": True},
)
marketplace_details.marketplace_subscription_status = AAZStrType(
serialized_name="marketplaceSubscriptionStatus",
)
marketplace_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
marketplace_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
network_profile = cls._schema_on_200.value.Element.properties.network_profile
network_profile.egress_nat_ip = AAZListType(
serialized_name="egressNatIp",
)
network_profile.enable_egress_nat = AAZStrType(
serialized_name="enableEgressNat",
flags={"required": True},
)
network_profile.network_type = AAZStrType(
serialized_name="networkType",
flags={"required": True},
)
network_profile.public_ips = AAZListType(
serialized_name="publicIps",
flags={"required": True},
)
network_profile.vnet_configuration = AAZObjectType(
serialized_name="vnetConfiguration",
)
network_profile.vwan_configuration = AAZObjectType(
serialized_name="vwanConfiguration",
)
egress_nat_ip = cls._schema_on_200.value.Element.properties.network_profile.egress_nat_ip
egress_nat_ip.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(egress_nat_ip.Element)
public_ips = cls._schema_on_200.value.Element.properties.network_profile.public_ips
public_ips.Element = AAZObjectType()
_ListHelper._build_schema_ip_address_read(public_ips.Element)
vnet_configuration = cls._schema_on_200.value.Element.properties.network_profile.vnet_configuration
vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ListHelper._build_schema_ip_address_read(
vnet_configuration.ip_of_trust_subnet_for_udr)
vnet_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.trust_subnet)
vnet_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.un_trust_subnet)
vnet_configuration.vnet = AAZObjectType(
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vnet_configuration.vnet)
vwan_configuration = cls._schema_on_200.value.Element.properties.network_profile.vwan_configuration
vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_ListHelper._build_schema_ip_address_read(
vwan_configuration.ip_of_trust_subnet_for_udr)
vwan_configuration.network_virtual_appliance_id = AAZStrType(
serialized_name="networkVirtualApplianceId",
)
vwan_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.trust_subnet)
vwan_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.un_trust_subnet)
vwan_configuration.v_hub = AAZObjectType(
serialized_name="vHub",
flags={"required": True},
)
_ListHelper._build_schema_ip_address_space_read(
vwan_configuration.v_hub)
panorama_config = cls._schema_on_200.value.Element.properties.panorama_config
panorama_config.cg_name = AAZStrType(
serialized_name="cgName",
flags={"read_only": True},
)
panorama_config.config_string = AAZStrType(
serialized_name="configString",
flags={"required": True},
)
panorama_config.dg_name = AAZStrType(
serialized_name="dgName",
flags={"read_only": True},
)
panorama_config.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
panorama_config.panorama_server = AAZStrType(
serialized_name="panoramaServer",
flags={"read_only": True},
)
panorama_config.panorama_server2 = AAZStrType(
serialized_name="panoramaServer2",
flags={"read_only": True},
)
panorama_config.tpl_name = AAZStrType(
serialized_name="tplName",
flags={"read_only": True},
)
panorama_config.vm_auth_key = AAZStrType(
serialized_name="vmAuthKey",
flags={"read_only": True},
)
plan_data = cls._schema_on_200.value.Element.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"read_only": True},
)
plan_data.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
)
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 FirewallsListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 40 | 3 | 38 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 383 | 35 | 348 | 45 | 331 | 0 | 147 | 38 | 137 | 2 | 1 | 1 | 11 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_remove_vm.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._remove_vm.RemoveVm.CloudVmClustersRemoveVms
|
class CloudVmClustersRemoveVms(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
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(
"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("dbServers", AAZListType, ".db_servers", typ_kwargs={
"flags": {"required": True}})
db_servers = _builder.get(".dbServers")
if db_servers is not None:
db_servers.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(
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.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200.properties.vip_ids
vip_ids.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 CloudVmClustersRemoveVms(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 | 36 | 2 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 382 | 31 | 351 | 44 | 332 | 0 | 137 | 35 | 126 | 3 | 1 | 1 | 14 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._list.List.CloudVmClustersListBySubscription
|
class CloudVmClustersListBySubscription(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/Oracle.Database/cloudVmClusters",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_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(
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.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200.value.Element.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200.value.Element.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200.value.Element.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200.value.Element.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200.value.Element.properties.vip_ids
vip_ids.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 CloudVmClustersListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 37 | 2 | 35 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 351 | 30 | 321 | 40 | 304 | 0 | 133 | 33 | 123 | 2 | 1 | 1 | 11 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._list.List.CloudVmClustersListByResourceGroup
|
class CloudVmClustersListByResourceGroup(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/Oracle.Database/cloudVmClusters",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_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(
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.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200.value.Element.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200.value.Element.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200.value.Element.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200.value.Element.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200.value.Element.properties.vip_ids
vip_ids.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 CloudVmClustersListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 37 | 2 | 35 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 355 | 30 | 325 | 40 | 308 | 0 | 133 | 33 | 123 | 2 | 1 | 1 | 11 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_delete.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._delete.Delete.CloudVmClustersDelete
|
class CloudVmClustersDelete(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class CloudVmClustersDelete(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 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_create.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._create.Create.CloudVmClustersCreateOrUpdate
|
class CloudVmClustersCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
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(
"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": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("backupSubnetCidr",
AAZStrType, ".backup_subnet_cidr")
properties.set_prop("cloudExadataInfrastructureId", AAZStrType,
".cloud_exadata_infrastructure_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("clusterName", AAZStrType, ".cluster_name")
properties.set_prop("cpuCoreCount", AAZIntType, ".cpu_core_count", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("dataCollectionOptions",
AAZObjectType, ".data_collection_options")
properties.set_prop("dataStoragePercentage",
AAZIntType, ".data_storage_percentage")
properties.set_prop("dataStorageSizeInTbs",
AAZFloatType, ".data_storage_size_in_tbs")
properties.set_prop("dbNodeStorageSizeInGbs",
AAZIntType, ".db_node_storage_size_in_gbs")
properties.set_prop("dbServers", AAZListType, ".db_servers")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("domain", AAZStrType, ".domain")
properties.set_prop("giVersion", AAZStrType, ".gi_version", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("hostname", AAZStrType, ".hostname", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("isLocalBackupEnabled",
AAZBoolType, ".is_local_backup_enabled")
properties.set_prop("isSparseDiskgroupEnabled",
AAZBoolType, ".is_sparse_diskgroup_enabled")
properties.set_prop(
"licenseModel", AAZStrType, ".license_model")
properties.set_prop("memorySizeInGbs",
AAZIntType, ".memory_size_in_gbs")
properties.set_prop("nsgCidrs", AAZListType, ".nsg_cidrs")
properties.set_prop("ocpuCount", AAZFloatType, ".ocpu_count")
properties.set_prop("scanListenerPortTcp",
AAZIntType, ".scan_listener_port_tcp")
properties.set_prop("scanListenerPortTcpSsl",
AAZIntType, ".scan_listener_port_tcp_ssl")
properties.set_prop("sshPublicKeys", AAZListType, ".ssh_public_keys", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"systemVersion", AAZStrType, ".system_version")
properties.set_prop("timeZone", AAZStrType, ".time_zone")
properties.set_prop("vnetId", AAZStrType, ".vnet_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("zoneId", AAZStrType, ".zone_id")
data_collection_options = _builder.get(
".properties.dataCollectionOptions")
if data_collection_options is not None:
data_collection_options.set_prop(
"isDiagnosticsEventsEnabled", AAZBoolType, ".is_diagnostics_events_enabled")
data_collection_options.set_prop(
"isHealthMonitoringEnabled", AAZBoolType, ".is_health_monitoring_enabled")
data_collection_options.set_prop(
"isIncidentLogsEnabled", AAZBoolType, ".is_incident_logs_enabled")
db_servers = _builder.get(".properties.dbServers")
if db_servers is not None:
db_servers.set_elements(AAZStrType, ".")
nsg_cidrs = _builder.get(".properties.nsgCidrs")
if nsg_cidrs is not None:
nsg_cidrs.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.nsgCidrs[]")
if _elements is not None:
_elements.set_prop("destinationPortRange",
AAZObjectType, ".destination_port_range")
_elements.set_prop("source", AAZStrType, ".source", typ_kwargs={
"flags": {"required": True}})
destination_port_range = _builder.get(
".properties.nsgCidrs[].destinationPortRange")
if destination_port_range is not None:
destination_port_range.set_prop("max", AAZIntType, ".max", typ_kwargs={
"flags": {"required": True}})
destination_port_range.set_prop("min", AAZIntType, ".min", typ_kwargs={
"flags": {"required": True}})
ssh_public_keys = _builder.get(".properties.sshPublicKeys")
if ssh_public_keys is not None:
ssh_public_keys.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(
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},
)
properties = cls._schema_on_200_201.properties
properties.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200_201.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200_201.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200_201.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200_201.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200_201.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200_201.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200_201.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200_201.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200_201.properties.vip_ids
vip_ids.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 CloudVmClustersCreateOrUpdate(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 | 42 | 3 | 39 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 442 | 38 | 404 | 51 | 385 | 0 | 190 | 42 | 179 | 9 | 1 | 1 | 21 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_add_vm.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._add_vm.AddVm.CloudVmClustersAddVms
|
class CloudVmClustersAddVms(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
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(
"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("dbServers", AAZListType, ".db_servers", typ_kwargs={
"flags": {"required": True}})
db_servers = _builder.get(".dbServers")
if db_servers is not None:
db_servers.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(
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.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200.properties.vip_ids
vip_ids.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 CloudVmClustersAddVms(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 | 36 | 2 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 382 | 31 | 351 | 44 | 332 | 0 | 137 | 35 | 126 | 3 | 1 | 1 | 14 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure.database_server._list.List.DbServersListByCloudExadataInfrastructure
|
class DbServersListByCloudExadataInfrastructure(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/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers",
**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(
"cloudexadatainfrastructurename", self.ctx.args.cloudexadatainfrastructurename,
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",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.autonomous_virtual_machine_ids = AAZListType(
serialized_name="autonomousVirtualMachineIds",
flags={"read_only": True},
)
properties.autonomous_vm_cluster_ids = AAZListType(
serialized_name="autonomousVmClusterIds",
flags={"read_only": True},
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"read_only": True},
)
properties.db_node_ids = AAZListType(
serialized_name="dbNodeIds",
flags={"read_only": True},
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
flags={"read_only": True},
)
properties.db_server_patching_details = AAZObjectType(
serialized_name="dbServerPatchingDetails",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"read_only": True},
)
properties.exadata_infrastructure_id = AAZStrType(
serialized_name="exadataInfrastructureId",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.max_cpu_count = AAZIntType(
serialized_name="maxCpuCount",
flags={"read_only": True},
)
properties.max_db_node_storage_in_gbs = AAZIntType(
serialized_name="maxDbNodeStorageInGbs",
flags={"read_only": True},
)
properties.max_memory_in_gbs = AAZIntType(
serialized_name="maxMemoryInGbs",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.vm_cluster_ids = AAZListType(
serialized_name="vmClusterIds",
flags={"read_only": True},
)
autonomous_virtual_machine_ids = cls._schema_on_200.value.Element.properties.autonomous_virtual_machine_ids
autonomous_virtual_machine_ids.Element = AAZStrType()
autonomous_vm_cluster_ids = cls._schema_on_200.value.Element.properties.autonomous_vm_cluster_ids
autonomous_vm_cluster_ids.Element = AAZStrType()
db_node_ids = cls._schema_on_200.value.Element.properties.db_node_ids
db_node_ids.Element = AAZStrType()
db_server_patching_details = cls._schema_on_200.value.Element.properties.db_server_patching_details
db_server_patching_details.estimated_patch_duration = AAZIntType(
serialized_name="estimatedPatchDuration",
flags={"read_only": True},
)
db_server_patching_details.patching_status = AAZStrType(
serialized_name="patchingStatus",
)
db_server_patching_details.time_patching_ended = AAZStrType(
serialized_name="timePatchingEnded",
flags={"read_only": True},
)
db_server_patching_details.time_patching_started = AAZStrType(
serialized_name="timePatchingStarted",
flags={"read_only": True},
)
vm_cluster_ids = cls._schema_on_200.value.Element.properties.vm_cluster_ids
vm_cluster_ids.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 DbServersListByCloudExadataInfrastructure(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 | 1 | 22 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 233 | 23 | 210 | 35 | 193 | 0 | 84 | 28 | 74 | 2 | 1 | 1 | 11 |
10,377 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigServerSettings
|
class ConfigServerSettings(_serialization.Model):
"""The settings of config server.
:ivar git_property: Property of git environment.
:vartype git_property: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerGitProperty
"""
_attribute_map = {
"git_property": {"key": "gitProperty", "type": "ConfigServerGitProperty"},
}
def __init__(self, *, git_property: Optional["_models.ConfigServerGitProperty"] = None, **kwargs: Any) -> None:
"""
:keyword git_property: Property of git environment.
:paramtype git_property: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerGitProperty
"""
super().__init__(**kwargs)
self.git_property = git_property
|
class ConfigServerSettings(_serialization.Model):
'''The settings of config server.
:ivar git_property: Property of git environment.
:vartype git_property: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerGitProperty
'''
def __init__(self, *, git_property: Optional["_models.ConfigServerGitProperty"] = None, **kwargs: Any) -> None:
'''
:keyword git_property: Property of git environment.
:paramtype git_property: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerGitProperty
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1.14 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 18 | 3 | 7 | 4 | 5 | 8 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
10,378 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigServerResource
|
class ConfigServerResource(ProxyResource):
"""Config Server resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the Config Server resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerProperties
"""
_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"},
"system_data": {"key": "systemData", "type": "SystemData"},
"properties": {"key": "properties", "type": "ConfigServerProperties"},
}
def __init__(self, *, properties: Optional["_models.ConfigServerProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the Config Server resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class ConfigServerResource(ProxyResource):
'''Config Server resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the Config Server resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerProperties
'''
def __init__(self, *, properties: Optional["_models.ConfigServerProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the Config Server resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerProperties
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 39 | 5 | 17 | 5 | 15 | 17 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
10,379 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigServerProperties
|
class ConfigServerProperties(_serialization.Model):
"""Config server git properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: State of the config server. Known values are: "NotAvailable",
"Deleted", "Failed", "Succeeded", and "Updating".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerState
:ivar error: Error when apply config server settings.
:vartype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:ivar config_server: Settings of config server.
:vartype config_server: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings
"""
_validation = {
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"error": {"key": "error", "type": "Error"},
"config_server": {"key": "configServer", "type": "ConfigServerSettings"},
}
def __init__(
self,
*,
error: Optional["_models.Error"] = None,
config_server: Optional["_models.ConfigServerSettings"] = None,
**kwargs: Any
) -> None:
"""
:keyword error: Error when apply config server settings.
:paramtype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:keyword config_server: Settings of config server.
:paramtype config_server: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.error = error
self.config_server = config_server
|
class ConfigServerProperties(_serialization.Model):
'''Config server git properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: State of the config server. Known values are: "NotAvailable",
"Deleted", "Failed", "Succeeded", and "Updating".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerState
:ivar error: Error when apply config server settings.
:vartype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:ivar config_server: Settings of config server.
:vartype config_server: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings
'''
def __init__(
self,
*,
error: Optional["_models.Error"] = None,
config_server: Optional["_models.ConfigServerSettings"] = None,
**kwargs: Any
) -> None:
'''
:keyword error: Error when apply config server settings.
:paramtype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:keyword config_server: Settings of config server.
:paramtype config_server: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings
'''
pass
| 2 | 2 | 17 | 0 | 11 | 6 | 1 | 0.85 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 16 | 42 | 5 | 20 | 13 | 12 | 17 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,380 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigServerGitProperty
|
class ConfigServerGitProperty(_serialization.Model):
"""Property of git.
All required parameters must be populated in order to send to server.
:ivar repositories: Repositories of git.
:vartype repositories: list[~azure.mgmt.appplatform.v2023_12_01.models.GitPatternRepository]
:ivar uri: URI of the repository. Required.
:vartype uri: str
:ivar label: Label of the repository.
:vartype label: str
:ivar search_paths: Searching path of the repository.
:vartype search_paths: list[str]
:ivar username: Username of git repository basic auth.
:vartype username: str
:ivar password: Password of git repository basic auth.
:vartype password: str
:ivar host_key: Public sshKey of git repository.
:vartype host_key: str
:ivar host_key_algorithm: SshKey algorithm of git repository.
:vartype host_key_algorithm: str
:ivar private_key: Private sshKey algorithm of git repository.
:vartype private_key: str
:ivar strict_host_key_checking: Strict host key checking or not.
:vartype strict_host_key_checking: bool
"""
_validation = {
"uri": {"required": True},
}
_attribute_map = {
"repositories": {"key": "repositories", "type": "[GitPatternRepository]"},
"uri": {"key": "uri", "type": "str"},
"label": {"key": "label", "type": "str"},
"search_paths": {"key": "searchPaths", "type": "[str]"},
"username": {"key": "username", "type": "str"},
"password": {"key": "password", "type": "str"},
"host_key": {"key": "hostKey", "type": "str"},
"host_key_algorithm": {"key": "hostKeyAlgorithm", "type": "str"},
"private_key": {"key": "privateKey", "type": "str"},
"strict_host_key_checking": {"key": "strictHostKeyChecking", "type": "bool"},
}
def __init__(
self,
*,
uri: str,
repositories: Optional[List["_models.GitPatternRepository"]] = None,
label: Optional[str] = None,
search_paths: Optional[List[str]] = None,
username: Optional[str] = None,
password: Optional[str] = None,
host_key: Optional[str] = None,
host_key_algorithm: Optional[str] = None,
private_key: Optional[str] = None,
strict_host_key_checking: Optional[bool] = None,
**kwargs: Any
) -> None:
"""
:keyword repositories: Repositories of git.
:paramtype repositories: list[~azure.mgmt.appplatform.v2023_12_01.models.GitPatternRepository]
:keyword uri: URI of the repository. Required.
:paramtype uri: str
:keyword label: Label of the repository.
:paramtype label: str
:keyword search_paths: Searching path of the repository.
:paramtype search_paths: list[str]
:keyword username: Username of git repository basic auth.
:paramtype username: str
:keyword password: Password of git repository basic auth.
:paramtype password: str
:keyword host_key: Public sshKey of git repository.
:paramtype host_key: str
:keyword host_key_algorithm: SshKey algorithm of git repository.
:paramtype host_key_algorithm: str
:keyword private_key: Private sshKey algorithm of git repository.
:paramtype private_key: str
:keyword strict_host_key_checking: Strict host key checking or not.
:paramtype strict_host_key_checking: bool
"""
super().__init__(**kwargs)
self.repositories = repositories
self.uri = uri
self.label = label
self.search_paths = search_paths
self.username = username
self.password = password
self.host_key = host_key
self.host_key_algorithm = host_key_algorithm
self.private_key = private_key
self.strict_host_key_checking = strict_host_key_checking
|
class ConfigServerGitProperty(_serialization.Model):
'''Property of git.
All required parameters must be populated in order to send to server.
:ivar repositories: Repositories of git.
:vartype repositories: list[~azure.mgmt.appplatform.v2023_12_01.models.GitPatternRepository]
:ivar uri: URI of the repository. Required.
:vartype uri: str
:ivar label: Label of the repository.
:vartype label: str
:ivar search_paths: Searching path of the repository.
:vartype search_paths: list[str]
:ivar username: Username of git repository basic auth.
:vartype username: str
:ivar password: Password of git repository basic auth.
:vartype password: str
:ivar host_key: Public sshKey of git repository.
:vartype host_key: str
:ivar host_key_algorithm: SshKey algorithm of git repository.
:vartype host_key_algorithm: str
:ivar private_key: Private sshKey algorithm of git repository.
:vartype private_key: str
:ivar strict_host_key_checking: Strict host key checking or not.
:vartype strict_host_key_checking: bool
'''
def __init__(
self,
*,
uri: str,
repositories: Optional[List["_models.GitPatternRepository"]] = None,
label: Optional[str] = None,
search_paths: Optional[List[str]] = None,
username: Optional[str] = None,
password: Optional[str] = None,
host_key: Optional[str] = None,
host_key_algorithm: Optional[str] = None,
private_key: Optional[str] = None,
strict_host_key_checking: Optional[bool] = None,
**kwargs: Any
) -> None:
'''
:keyword repositories: Repositories of git.
:paramtype repositories: list[~azure.mgmt.appplatform.v2023_12_01.models.GitPatternRepository]
:keyword uri: URI of the repository. Required.
:paramtype uri: str
:keyword label: Label of the repository.
:paramtype label: str
:keyword search_paths: Searching path of the repository.
:paramtype search_paths: list[str]
:keyword username: Username of git repository basic auth.
:paramtype username: str
:keyword password: Password of git repository basic auth.
:paramtype password: str
:keyword host_key: Public sshKey of git repository.
:paramtype host_key: str
:keyword host_key_algorithm: SshKey algorithm of git repository.
:paramtype host_key_algorithm: str
:keyword private_key: Private sshKey algorithm of git repository.
:paramtype private_key: str
:keyword strict_host_key_checking: Strict host key checking or not.
:paramtype strict_host_key_checking: bool
'''
pass
| 2 | 2 | 48 | 0 | 26 | 22 | 1 | 1.07 | 1 | 4 | 0 | 0 | 1 | 10 | 1 | 16 | 92 | 5 | 42 | 28 | 26 | 45 | 15 | 14 | 13 | 1 | 2 | 0 | 1 |
10,381 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ClusterResourceProperties
|
class ClusterResourceProperties(_serialization.Model):
"""Service properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of the Service. Known values are: "Creating",
"Updating", "Starting", "Stopping", "Deleting", "Deleted", "Succeeded", "Failed", "Moving",
"Moved", and "MoveFailed".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ProvisioningState
:ivar network_profile: Network profile of the Service.
:vartype network_profile: ~azure.mgmt.appplatform.v2023_12_01.models.NetworkProfile
:ivar vnet_addons: Additional Service settings in vnet injection instance.
:vartype vnet_addons: ~azure.mgmt.appplatform.v2023_12_01.models.ServiceVNetAddons
:ivar version: Version of the Service.
:vartype version: int
:ivar service_id: ServiceInstanceEntity Id which uniquely identifies a created resource.
:vartype service_id: str
:ivar power_state: Power state of the Service. Known values are: "Running" and "Stopped".
:vartype power_state: str or ~azure.mgmt.appplatform.v2023_12_01.models.PowerState
:ivar zone_redundant:
:vartype zone_redundant: bool
:ivar fqdn: Fully qualified dns name of the service instance.
:vartype fqdn: str
:ivar marketplace_resource: Purchasing 3rd party product of the Service resource.
:vartype marketplace_resource: ~azure.mgmt.appplatform.v2023_12_01.models.MarketplaceResource
"""
_validation = {
"provisioning_state": {"readonly": True},
"version": {"readonly": True},
"service_id": {"readonly": True},
"power_state": {"readonly": True},
"fqdn": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"network_profile": {"key": "networkProfile", "type": "NetworkProfile"},
"vnet_addons": {"key": "vnetAddons", "type": "ServiceVNetAddons"},
"version": {"key": "version", "type": "int"},
"service_id": {"key": "serviceId", "type": "str"},
"power_state": {"key": "powerState", "type": "str"},
"zone_redundant": {"key": "zoneRedundant", "type": "bool"},
"fqdn": {"key": "fqdn", "type": "str"},
"marketplace_resource": {"key": "marketplaceResource", "type": "MarketplaceResource"},
}
def __init__(
self,
*,
network_profile: Optional["_models.NetworkProfile"] = None,
vnet_addons: Optional["_models.ServiceVNetAddons"] = None,
zone_redundant: bool = False,
marketplace_resource: Optional["_models.MarketplaceResource"] = None,
**kwargs: Any
) -> None:
"""
:keyword network_profile: Network profile of the Service.
:paramtype network_profile: ~azure.mgmt.appplatform.v2023_12_01.models.NetworkProfile
:keyword vnet_addons: Additional Service settings in vnet injection instance.
:paramtype vnet_addons: ~azure.mgmt.appplatform.v2023_12_01.models.ServiceVNetAddons
:keyword zone_redundant:
:paramtype zone_redundant: bool
:keyword marketplace_resource: Purchasing 3rd party product of the Service resource.
:paramtype marketplace_resource: ~azure.mgmt.appplatform.v2023_12_01.models.MarketplaceResource
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.network_profile = network_profile
self.vnet_addons = vnet_addons
self.version = None
self.service_id = None
self.power_state = None
self.zone_redundant = zone_redundant
self.fqdn = None
self.marketplace_resource = marketplace_resource
|
class ClusterResourceProperties(_serialization.Model):
'''Service properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of the Service. Known values are: "Creating",
"Updating", "Starting", "Stopping", "Deleting", "Deleted", "Succeeded", "Failed", "Moving",
"Moved", and "MoveFailed".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ProvisioningState
:ivar network_profile: Network profile of the Service.
:vartype network_profile: ~azure.mgmt.appplatform.v2023_12_01.models.NetworkProfile
:ivar vnet_addons: Additional Service settings in vnet injection instance.
:vartype vnet_addons: ~azure.mgmt.appplatform.v2023_12_01.models.ServiceVNetAddons
:ivar version: Version of the Service.
:vartype version: int
:ivar service_id: ServiceInstanceEntity Id which uniquely identifies a created resource.
:vartype service_id: str
:ivar power_state: Power state of the Service. Known values are: "Running" and "Stopped".
:vartype power_state: str or ~azure.mgmt.appplatform.v2023_12_01.models.PowerState
:ivar zone_redundant:
:vartype zone_redundant: bool
:ivar fqdn: Fully qualified dns name of the service instance.
:vartype fqdn: str
:ivar marketplace_resource: Purchasing 3rd party product of the Service resource.
:vartype marketplace_resource: ~azure.mgmt.appplatform.v2023_12_01.models.MarketplaceResource
'''
def __init__(
self,
*,
network_profile: Optional["_models.NetworkProfile"] = None,
vnet_addons: Optional["_models.ServiceVNetAddons"] = None,
zone_redundant: bool = False,
marketplace_resource: Optional["_models.MarketplaceResource"] = None,
**kwargs: Any
) -> None:
'''
:keyword network_profile: Network profile of the Service.
:paramtype network_profile: ~azure.mgmt.appplatform.v2023_12_01.models.NetworkProfile
:keyword vnet_addons: Additional Service settings in vnet injection instance.
:paramtype vnet_addons: ~azure.mgmt.appplatform.v2023_12_01.models.ServiceVNetAddons
:keyword zone_redundant:
:paramtype zone_redundant: bool
:keyword marketplace_resource: Purchasing 3rd party product of the Service resource.
:paramtype marketplace_resource: ~azure.mgmt.appplatform.v2023_12_01.models.MarketplaceResource
'''
pass
| 2 | 2 | 29 | 0 | 19 | 10 | 1 | 0.89 | 1 | 3 | 0 | 0 | 1 | 9 | 1 | 16 | 77 | 5 | 38 | 21 | 28 | 34 | 14 | 13 | 12 | 1 | 2 | 0 | 1 |
10,382 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.CloudErrorBody
|
class CloudErrorBody(_serialization.Model):
"""An error response from the service.
:ivar code: An identifier for the error. Codes are invariant and are intended to be consumed
programmatically.
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for display in a user
interface.
:vartype message: str
:ivar target: The target of the particular error. For example, the name of the property in
error.
:vartype target: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.appplatform.v2023_12_01.models.CloudErrorBody]
"""
_attribute_map = {
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
"target": {"key": "target", "type": "str"},
"details": {"key": "details", "type": "[CloudErrorBody]"},
}
def __init__(
self,
*,
code: Optional[str] = None,
message: Optional[str] = None,
target: Optional[str] = None,
details: Optional[List["_models.CloudErrorBody"]] = None,
**kwargs: Any
) -> None:
"""
:keyword code: An identifier for the error. Codes are invariant and are intended to be consumed
programmatically.
:paramtype code: str
:keyword message: A message describing the error, intended to be suitable for display in a user
interface.
:paramtype message: str
:keyword target: The target of the particular error. For example, the name of the property in
error.
:paramtype target: str
:keyword details: A list of additional details about the error.
:paramtype details: list[~azure.mgmt.appplatform.v2023_12_01.models.CloudErrorBody]
"""
super().__init__(**kwargs)
self.code = code
self.message = message
self.target = target
self.details = details
|
class CloudErrorBody(_serialization.Model):
'''An error response from the service.
:ivar code: An identifier for the error. Codes are invariant and are intended to be consumed
programmatically.
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for display in a user
interface.
:vartype message: str
:ivar target: The target of the particular error. For example, the name of the property in
error.
:vartype target: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.appplatform.v2023_12_01.models.CloudErrorBody]
'''
def __init__(
self,
*,
code: Optional[str] = None,
message: Optional[str] = None,
target: Optional[str] = None,
details: Optional[List["_models.CloudErrorBody"]] = None,
**kwargs: Any
) -> None:
'''
:keyword code: An identifier for the error. Codes are invariant and are intended to be consumed
programmatically.
:paramtype code: str
:keyword message: A message describing the error, intended to be suitable for display in a user
interface.
:paramtype message: str
:keyword target: The target of the particular error. For example, the name of the property in
error.
:paramtype target: str
:keyword details: A list of additional details about the error.
:paramtype details: list[~azure.mgmt.appplatform.v2023_12_01.models.CloudErrorBody]
'''
pass
| 2 | 2 | 27 | 0 | 14 | 13 | 1 | 1.24 | 1 | 3 | 0 | 0 | 1 | 4 | 1 | 16 | 50 | 3 | 21 | 15 | 11 | 26 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,383 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.CertificateResourceCollection
|
class CertificateResourceCollection(_serialization.Model):
"""Collection compose of certificate resources list and a possible link for next page.
:ivar value: The certificate resources list.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource]
:ivar next_link: The link to next page of certificate list.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[CertificateResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self,
*,
value: Optional[List["_models.CertificateResource"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword value: The certificate resources list.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource]
:keyword next_link: The link to next page of certificate list.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class CertificateResourceCollection(_serialization.Model):
'''Collection compose of certificate resources list and a possible link for next page.
:ivar value: The certificate resources list.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource]
:ivar next_link: The link to next page of certificate list.
:vartype next_link: str
'''
def __init__(
self,
*,
value: Optional[List["_models.CertificateResource"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword value: The certificate resources list.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource]
:keyword next_link: The link to next page of certificate list.
:paramtype next_link: str
'''
pass
| 2 | 2 | 16 | 0 | 10 | 6 | 1 | 0.8 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 30 | 3 | 15 | 11 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,384 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.CertificateResource
|
class CertificateResource(ProxyResource):
"""Certificate resource payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the certificate resource payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateProperties
"""
_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"},
"system_data": {"key": "systemData", "type": "SystemData"},
"properties": {"key": "properties", "type": "CertificateProperties"},
}
def __init__(self, *, properties: Optional["_models.CertificateProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the certificate resource payload.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class CertificateResource(ProxyResource):
'''Certificate resource payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Properties of the certificate resource payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateProperties
'''
def __init__(self, *, properties: Optional["_models.CertificateProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the certificate resource payload.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateProperties
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 39 | 5 | 17 | 5 | 15 | 17 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
10,385 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.CertificateProperties
|
class CertificateProperties(_serialization.Model):
"""Certificate resource payload.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ContentCertificateProperties, KeyVaultCertificateProperties
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar type: The type of the certificate source. Required.
:vartype type: str
:ivar thumbprint: The thumbprint of certificate.
:vartype thumbprint: str
:ivar issuer: The issuer of certificate.
:vartype issuer: str
:ivar issued_date: The issue date of certificate.
:vartype issued_date: str
:ivar expiration_date: The expiration date of certificate.
:vartype expiration_date: str
:ivar activate_date: The activate date of certificate.
:vartype activate_date: str
:ivar subject_name: The subject name of certificate.
:vartype subject_name: str
:ivar dns_names: The domain list of certificate.
:vartype dns_names: list[str]
:ivar provisioning_state: Provisioning state of the Certificate. Known values are: "Creating",
"Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.CertificateResourceProvisioningState
"""
_validation = {
"type": {"required": True},
"thumbprint": {"readonly": True},
"issuer": {"readonly": True},
"issued_date": {"readonly": True},
"expiration_date": {"readonly": True},
"activate_date": {"readonly": True},
"subject_name": {"readonly": True},
"dns_names": {"readonly": True},
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"type": {"key": "type", "type": "str"},
"thumbprint": {"key": "thumbprint", "type": "str"},
"issuer": {"key": "issuer", "type": "str"},
"issued_date": {"key": "issuedDate", "type": "str"},
"expiration_date": {"key": "expirationDate", "type": "str"},
"activate_date": {"key": "activateDate", "type": "str"},
"subject_name": {"key": "subjectName", "type": "str"},
"dns_names": {"key": "dnsNames", "type": "[str]"},
"provisioning_state": {"key": "provisioningState", "type": "str"},
}
_subtype_map = {
"type": {
"ContentCertificate": "ContentCertificateProperties",
"KeyVaultCertificate": "KeyVaultCertificateProperties",
}
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.type: Optional[str] = None
self.thumbprint = None
self.issuer = None
self.issued_date = None
self.expiration_date = None
self.activate_date = None
self.subject_name = None
self.dns_names = None
self.provisioning_state = None
|
class CertificateProperties(_serialization.Model):
'''Certificate resource payload.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ContentCertificateProperties, KeyVaultCertificateProperties
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar type: The type of the certificate source. Required.
:vartype type: str
:ivar thumbprint: The thumbprint of certificate.
:vartype thumbprint: str
:ivar issuer: The issuer of certificate.
:vartype issuer: str
:ivar issued_date: The issue date of certificate.
:vartype issued_date: str
:ivar expiration_date: The expiration date of certificate.
:vartype expiration_date: str
:ivar activate_date: The activate date of certificate.
:vartype activate_date: str
:ivar subject_name: The subject name of certificate.
:vartype subject_name: str
:ivar dns_names: The domain list of certificate.
:vartype dns_names: list[str]
:ivar provisioning_state: Provisioning state of the Certificate. Known values are: "Creating",
"Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.CertificateResourceProvisioningState
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 12 | 0 | 11 | 1 | 1 | 0.68 | 1 | 3 | 0 | 2 | 1 | 9 | 1 | 16 | 75 | 8 | 40 | 14 | 38 | 27 | 15 | 14 | 13 | 1 | 2 | 0 | 1 |
10,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/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_update.py
|
azext_managednetworkfabric.aaz.latest.networkfabric.taprule._update.Update.NetworkTapRulesUpdate
|
class NetworkTapRulesUpdate(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.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}",
**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(
"networkTapRuleName", self.ctx.args.resource_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-02-15-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("annotation", AAZStrType, ".annotation")
properties.set_prop("configurationType",
AAZStrType, ".configuration_type")
properties.set_prop(
"dynamicMatchConfigurations", AAZListType, ".dynamic_match_configurations")
properties.set_prop("matchConfigurations",
AAZListType, ".match_configurations")
properties.set_prop(
"tapRulesUrl", AAZStrType, ".tap_rules_url")
dynamic_match_configurations = _builder.get(
".properties.dynamicMatchConfigurations")
if dynamic_match_configurations is not None:
dynamic_match_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.dynamicMatchConfigurations[]")
if _elements is not None:
_elements.set_prop("ipGroups", AAZListType, ".ip_groups")
_elements.set_prop("portGroups", AAZListType, ".port_groups")
_elements.set_prop("vlanGroups", AAZListType, ".vlan_groups")
ip_groups = _builder.get(
".properties.dynamicMatchConfigurations[].ipGroups")
if ip_groups is not None:
ip_groups.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.dynamicMatchConfigurations[].ipGroups[]")
if _elements is not None:
_elements.set_prop(
"ipAddressType", AAZStrType, ".ip_address_type")
_elements.set_prop("ipPrefixes", AAZListType, ".ip_prefixes")
_elements.set_prop("name", AAZStrType, ".name")
ip_prefixes = _builder.get(
".properties.dynamicMatchConfigurations[].ipGroups[].ipPrefixes")
if ip_prefixes is not None:
ip_prefixes.set_elements(AAZStrType, ".")
port_groups = _builder.get(
".properties.dynamicMatchConfigurations[].portGroups")
if port_groups is not None:
port_groups.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.dynamicMatchConfigurations[].portGroups[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("ports", AAZListType, ".ports")
ports = _builder.get(
".properties.dynamicMatchConfigurations[].portGroups[].ports")
if ports is not None:
ports.set_elements(AAZStrType, ".")
vlan_groups = _builder.get(
".properties.dynamicMatchConfigurations[].vlanGroups")
if vlan_groups is not None:
vlan_groups.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.dynamicMatchConfigurations[].vlanGroups[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("vlans", AAZListType, ".vlans")
vlans = _builder.get(
".properties.dynamicMatchConfigurations[].vlanGroups[].vlans")
if vlans is not None:
vlans.set_elements(AAZStrType, ".")
match_configurations = _builder.get(
".properties.matchConfigurations")
if match_configurations is not None:
match_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.matchConfigurations[]")
if _elements is not None:
_elements.set_prop("actions", AAZListType, ".actions")
_elements.set_prop(
"ipAddressType", AAZStrType, ".ip_address_type")
_elements.set_prop("matchConditions",
AAZListType, ".match_conditions")
_elements.set_prop("matchConfigurationName",
AAZStrType, ".match_configuration_name")
_elements.set_prop(
"sequenceNumber", AAZIntType, ".sequence_number")
actions = _builder.get(".properties.matchConfigurations[].actions")
if actions is not None:
actions.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.matchConfigurations[].actions[]")
if _elements is not None:
_elements.set_prop(
"destinationId", AAZStrType, ".destination_id")
_elements.set_prop("isTimestampEnabled",
AAZStrType, ".is_timestamp_enabled")
_elements.set_prop("matchConfigurationName",
AAZStrType, ".match_configuration_name")
_elements.set_prop("truncate", AAZStrType, ".truncate")
_elements.set_prop("type", AAZStrType, ".type")
match_conditions = _builder.get(
".properties.matchConfigurations[].matchConditions")
if match_conditions is not None:
match_conditions.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.matchConfigurations[].matchConditions[]")
if _elements is not None:
_elements.set_prop("encapsulationType",
AAZStrType, ".encapsulation_type")
_elements.set_prop(
"ipCondition", AAZObjectType, ".ip_condition")
_elements.set_prop(
"portCondition", AAZObjectType, ".port_condition")
_elements.set_prop(
"protocolTypes", AAZListType, ".protocol_types")
_elements.set_prop("vlanMatchCondition",
AAZObjectType, ".vlan_match_condition")
ip_condition = _builder.get(
".properties.matchConfigurations[].matchConditions[].ipCondition")
if ip_condition is not None:
ip_condition.set_prop(
"ipGroupNames", AAZListType, ".ip_group_names")
ip_condition.set_prop(
"ipPrefixValues", AAZListType, ".ip_prefix_values")
ip_condition.set_prop("prefixType", AAZStrType, ".prefix_type")
ip_condition.set_prop("type", AAZStrType, ".type")
ip_group_names = _builder.get(
".properties.matchConfigurations[].matchConditions[].ipCondition.ipGroupNames")
if ip_group_names is not None:
ip_group_names.set_elements(AAZStrType, ".")
ip_prefix_values = _builder.get(
".properties.matchConfigurations[].matchConditions[].ipCondition.ipPrefixValues")
if ip_prefix_values is not None:
ip_prefix_values.set_elements(AAZStrType, ".")
port_condition = _builder.get(
".properties.matchConfigurations[].matchConditions[].portCondition")
if port_condition is not None:
port_condition.set_prop("layer4Protocol", AAZStrType, ".layer4_protocol", typ_kwargs={
"flags": {"required": True}})
port_condition.set_prop(
"portGroupNames", AAZListType, ".port_group_names")
port_condition.set_prop("portType", AAZStrType, ".port_type")
port_condition.set_prop("ports", AAZListType, ".ports")
port_group_names = _builder.get(
".properties.matchConfigurations[].matchConditions[].portCondition.portGroupNames")
if port_group_names is not None:
port_group_names.set_elements(AAZStrType, ".")
ports = _builder.get(
".properties.matchConfigurations[].matchConditions[].portCondition.ports")
if ports is not None:
ports.set_elements(AAZStrType, ".")
protocol_types = _builder.get(
".properties.matchConfigurations[].matchConditions[].protocolTypes")
if protocol_types is not None:
protocol_types.set_elements(AAZStrType, ".")
vlan_match_condition = _builder.get(
".properties.matchConfigurations[].matchConditions[].vlanMatchCondition")
if vlan_match_condition is not None:
vlan_match_condition.set_prop(
"innerVlans", AAZListType, ".inner_vlans")
vlan_match_condition.set_prop(
"vlanGroupNames", AAZListType, ".vlan_group_names")
vlan_match_condition.set_prop("vlans", AAZListType, ".vlans")
inner_vlans = _builder.get(
".properties.matchConfigurations[].matchConditions[].vlanMatchCondition.innerVlans")
if inner_vlans is not None:
inner_vlans.set_elements(AAZStrType, ".")
vlan_group_names = _builder.get(
".properties.matchConfigurations[].matchConditions[].vlanMatchCondition.vlanGroupNames")
if vlan_group_names is not None:
vlan_group_names.set_elements(AAZStrType, ".")
vlans = _builder.get(
".properties.matchConfigurations[].matchConditions[].vlanMatchCondition.vlans")
if vlans is not None:
vlans.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(
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.administrative_state = AAZStrType(
serialized_name="administrativeState",
flags={"read_only": True},
)
properties.annotation = AAZStrType()
properties.configuration_state = AAZStrType(
serialized_name="configurationState",
flags={"read_only": True},
)
properties.configuration_type = AAZStrType(
serialized_name="configurationType",
flags={"required": True},
)
properties.dynamic_match_configurations = AAZListType(
serialized_name="dynamicMatchConfigurations",
)
properties.last_synced_time = AAZStrType(
serialized_name="lastSyncedTime",
flags={"read_only": True},
)
properties.match_configurations = AAZListType(
serialized_name="matchConfigurations",
)
properties.network_tap_id = AAZStrType(
serialized_name="networkTapId",
flags={"read_only": True},
)
properties.polling_interval_in_seconds = AAZIntType(
serialized_name="pollingIntervalInSeconds",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.tap_rules_url = AAZStrType(
serialized_name="tapRulesUrl",
)
dynamic_match_configurations = cls._schema_on_200.properties.dynamic_match_configurations
dynamic_match_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.dynamic_match_configurations.Element
_element.ip_groups = AAZListType(
serialized_name="ipGroups",
)
_element.port_groups = AAZListType(
serialized_name="portGroups",
)
_element.vlan_groups = AAZListType(
serialized_name="vlanGroups",
)
ip_groups = cls._schema_on_200.properties.dynamic_match_configurations.Element.ip_groups
ip_groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.dynamic_match_configurations.Element.ip_groups.Element
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
)
_element.ip_prefixes = AAZListType(
serialized_name="ipPrefixes",
)
_element.name = AAZStrType()
ip_prefixes = cls._schema_on_200.properties.dynamic_match_configurations.Element.ip_groups.Element.ip_prefixes
ip_prefixes.Element = AAZStrType()
port_groups = cls._schema_on_200.properties.dynamic_match_configurations.Element.port_groups
port_groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.dynamic_match_configurations.Element.port_groups.Element
_element.name = AAZStrType()
_element.ports = AAZListType()
ports = cls._schema_on_200.properties.dynamic_match_configurations.Element.port_groups.Element.ports
ports.Element = AAZStrType()
vlan_groups = cls._schema_on_200.properties.dynamic_match_configurations.Element.vlan_groups
vlan_groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.dynamic_match_configurations.Element.vlan_groups.Element
_element.name = AAZStrType()
_element.vlans = AAZListType()
vlans = cls._schema_on_200.properties.dynamic_match_configurations.Element.vlan_groups.Element.vlans
vlans.Element = AAZStrType()
match_configurations = cls._schema_on_200.properties.match_configurations
match_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.match_configurations.Element
_element.actions = AAZListType()
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
)
_element.match_conditions = AAZListType(
serialized_name="matchConditions",
)
_element.match_configuration_name = AAZStrType(
serialized_name="matchConfigurationName",
)
_element.sequence_number = AAZIntType(
serialized_name="sequenceNumber",
)
actions = cls._schema_on_200.properties.match_configurations.Element.actions
actions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.match_configurations.Element.actions.Element
_element.destination_id = AAZStrType(
serialized_name="destinationId",
)
_element.is_timestamp_enabled = AAZStrType(
serialized_name="isTimestampEnabled",
)
_element.match_configuration_name = AAZStrType(
serialized_name="matchConfigurationName",
)
_element.truncate = AAZStrType()
_element.type = AAZStrType()
match_conditions = cls._schema_on_200.properties.match_configurations.Element.match_conditions
match_conditions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element
_element.encapsulation_type = AAZStrType(
serialized_name="encapsulationType",
)
_element.ip_condition = AAZObjectType(
serialized_name="ipCondition",
)
_element.port_condition = AAZObjectType(
serialized_name="portCondition",
)
_element.protocol_types = AAZListType(
serialized_name="protocolTypes",
)
_element.vlan_match_condition = AAZObjectType(
serialized_name="vlanMatchCondition",
)
ip_condition = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.ip_condition
ip_condition.ip_group_names = AAZListType(
serialized_name="ipGroupNames",
)
ip_condition.ip_prefix_values = AAZListType(
serialized_name="ipPrefixValues",
)
ip_condition.prefix_type = AAZStrType(
serialized_name="prefixType",
)
ip_condition.type = AAZStrType()
ip_group_names = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.ip_condition.ip_group_names
ip_group_names.Element = AAZStrType()
ip_prefix_values = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.ip_condition.ip_prefix_values
ip_prefix_values.Element = AAZStrType()
port_condition = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.port_condition
port_condition.layer4_protocol = AAZStrType(
serialized_name="layer4Protocol",
flags={"required": True},
)
port_condition.port_group_names = AAZListType(
serialized_name="portGroupNames",
)
port_condition.port_type = AAZStrType(
serialized_name="portType",
)
port_condition.ports = AAZListType()
port_group_names = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.port_condition.port_group_names
port_group_names.Element = AAZStrType()
ports = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.port_condition.ports
ports.Element = AAZStrType()
protocol_types = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.protocol_types
protocol_types.Element = AAZStrType()
vlan_match_condition = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.vlan_match_condition
vlan_match_condition.inner_vlans = AAZListType(
serialized_name="innerVlans",
)
vlan_match_condition.vlan_group_names = AAZListType(
serialized_name="vlanGroupNames",
)
vlan_match_condition.vlans = AAZListType()
inner_vlans = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.vlan_match_condition.inner_vlans
inner_vlans.Element = AAZStrType()
vlan_group_names = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlan_group_names
vlan_group_names.Element = AAZStrType()
vlans = cls._schema_on_200.properties.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlans
vlans.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 NetworkTapRulesUpdate(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 | 49 | 7 | 42 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 507 | 77 | 430 | 75 | 411 | 0 | 270 | 66 | 259 | 31 | 1 | 1 | 43 |
10,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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._update.Update.CloudVmClustersCreateOrUpdate
|
class CloudVmClustersCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
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(
"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_cloud_vm_cluster_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class CloudVmClustersCreateOrUpdate(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 |
10,388 |
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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._update.Update.CloudVmClustersGet
|
class CloudVmClustersGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
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()
_UpdateHelper._build_schema_cloud_vm_cluster_read(
cls._schema_on_200)
return cls._schema_on_200
|
class CloudVmClustersGet(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 |
10,389 |
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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"computeNodes", AAZListType, ".compute_nodes")
properties.set_prop("cpuCoreCount", AAZIntType, ".cpu_core_count", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("dataCollectionOptions",
AAZObjectType, ".data_collection_options")
properties.set_prop("dataStorageSizeInTbs",
AAZFloatType, ".data_storage_size_in_tbs")
properties.set_prop("dbNodeStorageSizeInGbs",
AAZIntType, ".db_node_storage_size_in_gbs")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"licenseModel", AAZStrType, ".license_model")
properties.set_prop("memorySizeInGbs",
AAZIntType, ".memory_size_in_gbs")
properties.set_prop("ocpuCount", AAZFloatType, ".ocpu_count")
properties.set_prop("sshPublicKeys", AAZListType, ".ssh_public_keys", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("storageSizeInGbs",
AAZIntType, ".storage_size_in_gbs")
compute_nodes = _builder.get(".properties.computeNodes")
if compute_nodes is not None:
compute_nodes.set_elements(AAZStrType, ".")
data_collection_options = _builder.get(
".properties.dataCollectionOptions")
if data_collection_options is not None:
data_collection_options.set_prop(
"isDiagnosticsEventsEnabled", AAZBoolType, ".is_diagnostics_events_enabled")
data_collection_options.set_prop(
"isHealthMonitoringEnabled", AAZBoolType, ".is_health_monitoring_enabled")
data_collection_options.set_prop(
"isIncidentLogsEnabled", AAZBoolType, ".is_incident_logs_enabled")
ssh_public_keys = _builder.get(".properties.sshPublicKeys")
if ssh_public_keys is not None:
ssh_public_keys.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 | 22 | 3 | 19 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 47 | 8 | 39 | 9 | 36 | 0 | 35 | 9 | 32 | 6 | 1 | 1 | 7 |
10,390 |
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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_wait.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_vm_cluster._wait.Wait.CloudVmClustersGet
|
class CloudVmClustersGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}",
**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(
"cloudvmclustername", self.ctx.args.cloudvmclustername,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.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.backup_subnet_cidr = AAZStrType(
serialized_name="backupSubnetCidr",
)
properties.cloud_exadata_infrastructure_id = AAZStrType(
serialized_name="cloudExadataInfrastructureId",
flags={"required": True},
)
properties.cluster_name = AAZStrType(
serialized_name="clusterName",
)
properties.compartment_id = AAZStrType(
serialized_name="compartmentId",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
flags={"required": True},
)
properties.data_collection_options = AAZObjectType(
serialized_name="dataCollectionOptions",
)
properties.data_storage_percentage = AAZIntType(
serialized_name="dataStoragePercentage",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
)
properties.db_servers = AAZListType(
serialized_name="dbServers",
)
properties.disk_redundancy = AAZStrType(
serialized_name="diskRedundancy",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.domain = AAZStrType()
properties.gi_version = AAZStrType(
serialized_name="giVersion",
flags={"required": True},
)
properties.hostname = AAZStrType(
flags={"required": True},
)
properties.iorm_config_cache = AAZObjectType(
serialized_name="iormConfigCache",
)
properties.is_local_backup_enabled = AAZBoolType(
serialized_name="isLocalBackupEnabled",
)
properties.is_sparse_diskgroup_enabled = AAZBoolType(
serialized_name="isSparseDiskgroupEnabled",
)
properties.last_update_history_entry_id = AAZStrType(
serialized_name="lastUpdateHistoryEntryId",
)
properties.license_model = AAZStrType(
serialized_name="licenseModel",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.listener_port = AAZIntType(
serialized_name="listenerPort",
flags={"read_only": True},
)
properties.memory_size_in_gbs = AAZIntType(
serialized_name="memorySizeInGbs",
)
properties.node_count = AAZIntType(
serialized_name="nodeCount",
flags={"read_only": True},
)
properties.nsg_cidrs = AAZListType(
serialized_name="nsgCidrs",
)
properties.nsg_url = AAZStrType(
serialized_name="nsgUrl",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.ocpu_count = AAZFloatType(
serialized_name="ocpuCount",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scan_dns_name = AAZStrType(
serialized_name="scanDnsName",
flags={"read_only": True},
)
properties.scan_dns_record_id = AAZStrType(
serialized_name="scanDnsRecordId",
)
properties.scan_ip_ids = AAZListType(
serialized_name="scanIpIds",
flags={"read_only": True},
)
properties.scan_listener_port_tcp = AAZIntType(
serialized_name="scanListenerPortTcp",
)
properties.scan_listener_port_tcp_ssl = AAZIntType(
serialized_name="scanListenerPortTcpSsl",
)
properties.shape = AAZStrType(
flags={"read_only": True},
)
properties.ssh_public_keys = AAZListType(
serialized_name="sshPublicKeys",
flags={"required": True},
)
properties.storage_size_in_gbs = AAZIntType(
serialized_name="storageSizeInGbs",
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.subnet_ocid = AAZStrType(
serialized_name="subnetOcid",
)
properties.system_version = AAZStrType(
serialized_name="systemVersion",
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_zone = AAZStrType(
serialized_name="timeZone",
)
properties.vip_ids = AAZListType(
serialized_name="vipIds",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
flags={"required": True},
)
properties.zone_id = AAZStrType(
serialized_name="zoneId",
)
data_collection_options = cls._schema_on_200.properties.data_collection_options
data_collection_options.is_diagnostics_events_enabled = AAZBoolType(
serialized_name="isDiagnosticsEventsEnabled",
)
data_collection_options.is_health_monitoring_enabled = AAZBoolType(
serialized_name="isHealthMonitoringEnabled",
)
data_collection_options.is_incident_logs_enabled = AAZBoolType(
serialized_name="isIncidentLogsEnabled",
)
db_servers = cls._schema_on_200.properties.db_servers
db_servers.Element = AAZStrType()
iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache
iorm_config_cache.db_plans = AAZListType(
serialized_name="dbPlans",
)
iorm_config_cache.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
iorm_config_cache.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
iorm_config_cache.objective = AAZStrType()
db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans
db_plans.Element = AAZObjectType()
_element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element
_element.db_name = AAZStrType(
serialized_name="dbName",
)
_element.flash_cache_limit = AAZStrType(
serialized_name="flashCacheLimit",
)
_element.share = AAZIntType()
nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs
nsg_cidrs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.nsg_cidrs.Element
_element.destination_port_range = AAZObjectType(
serialized_name="destinationPortRange",
)
_element.source = AAZStrType(
flags={"required": True},
)
destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range
destination_port_range.max = AAZIntType(
flags={"required": True},
)
destination_port_range.min = AAZIntType(
flags={"required": True},
)
scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids
scan_ip_ids.Element = AAZStrType()
ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys
ssh_public_keys.Element = AAZStrType()
vip_ids = cls._schema_on_200.properties.vip_ids
vip_ids.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 CloudVmClustersGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 36 | 2 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 348 | 28 | 320 | 39 | 303 | 0 | 128 | 32 | 118 | 2 | 1 | 1 | 11 |
10,391 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigurationServiceResource
|
class ConfigurationServiceResource(ProxyResource):
"""Application Configuration Service resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Application Configuration Service properties payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProperties
"""
_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"},
"system_data": {"key": "systemData", "type": "SystemData"},
"properties": {"key": "properties", "type": "ConfigurationServiceProperties"},
}
def __init__(self, *, properties: Optional["_models.ConfigurationServiceProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Application Configuration Service properties payload.
:paramtype properties:
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class ConfigurationServiceResource(ProxyResource):
'''Application Configuration Service resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData
:ivar properties: Application Configuration Service properties payload.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProperties
'''
def __init__(self, *, properties: Optional["_models.ConfigurationServiceProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Application Configuration Service properties payload.
:paramtype properties:
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProperties
'''
pass
| 2 | 2 | 8 | 0 | 3 | 5 | 1 | 1.06 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 40 | 5 | 17 | 5 | 15 | 18 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
10,392 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigurationServiceProperties
|
class ConfigurationServiceProperties(_serialization.Model):
"""Application Configuration Service properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: State of the Application Configuration Service. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProvisioningState
:ivar generation: The generation of the Application Configuration Service. Known values are:
"Gen1" and "Gen2".
:vartype generation: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGeneration
:ivar resource_requests: The requested resource quantity for required CPU and Memory.
:vartype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResourceRequests
:ivar instances: Collection of instances belong to Application Configuration Service.
:vartype instances:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceInstance]
:ivar settings: The settings of Application Configuration Service.
:vartype settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings
"""
_validation = {
"provisioning_state": {"readonly": True},
"resource_requests": {"readonly": True},
"instances": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"generation": {"key": "generation", "type": "str"},
"resource_requests": {"key": "resourceRequests", "type": "ConfigurationServiceResourceRequests"},
"instances": {"key": "instances", "type": "[ConfigurationServiceInstance]"},
"settings": {"key": "settings", "type": "ConfigurationServiceSettings"},
}
def __init__(
self,
*,
generation: Union[str, "_models.ConfigurationServiceGeneration"] = "Gen1",
settings: Optional["_models.ConfigurationServiceSettings"] = None,
**kwargs: Any
) -> None:
"""
:keyword generation: The generation of the Application Configuration Service. Known values are:
"Gen1" and "Gen2".
:paramtype generation: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGeneration
:keyword settings: The settings of Application Configuration Service.
:paramtype settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.generation = generation
self.resource_requests = None
self.instances = None
self.settings = settings
|
class ConfigurationServiceProperties(_serialization.Model):
'''Application Configuration Service properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: State of the Application Configuration Service. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceProvisioningState
:ivar generation: The generation of the Application Configuration Service. Known values are:
"Gen1" and "Gen2".
:vartype generation: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGeneration
:ivar resource_requests: The requested resource quantity for required CPU and Memory.
:vartype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResourceRequests
:ivar instances: Collection of instances belong to Application Configuration Service.
:vartype instances:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceInstance]
:ivar settings: The settings of Application Configuration Service.
:vartype settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings
'''
def __init__(
self,
*,
generation: Union[str, "_models.ConfigurationServiceGeneration"] = "Gen1",
settings: Optional["_models.ConfigurationServiceSettings"] = None,
**kwargs: Any
) -> None:
'''
:keyword generation: The generation of the Application Configuration Service. Known values are:
"Gen1" and "Gen2".
:paramtype generation: str or
~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGeneration
:keyword settings: The settings of Application Configuration Service.
:paramtype settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings
'''
pass
| 2 | 2 | 21 | 0 | 13 | 8 | 1 | 1.04 | 1 | 3 | 0 | 0 | 1 | 5 | 1 | 16 | 58 | 5 | 26 | 15 | 18 | 27 | 10 | 9 | 8 | 1 | 2 | 0 | 1 |
10,393 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigurationServiceGitRepository
|
class ConfigurationServiceGitRepository(_serialization.Model): # pylint: disable=too-many-instance-attributes
"""Git repository property payload for Application Configuration Service.
All required parameters must be populated in order to send to server.
:ivar name: Name of the repository. Required.
:vartype name: str
:ivar patterns: Collection of patterns of the repository. Required.
:vartype patterns: list[str]
:ivar uri: URI of the repository. Required.
:vartype uri: str
:ivar label: Label of the repository. Required.
:vartype label: str
:ivar search_paths: Searching path of the repository.
:vartype search_paths: list[str]
:ivar username: Username of git repository basic auth.
:vartype username: str
:ivar password: Password of git repository basic auth.
:vartype password: str
:ivar host_key: Public sshKey of git repository.
:vartype host_key: str
:ivar host_key_algorithm: SshKey algorithm of git repository.
:vartype host_key_algorithm: str
:ivar private_key: Private sshKey algorithm of git repository.
:vartype private_key: str
:ivar strict_host_key_checking: Strict host key checking or not.
:vartype strict_host_key_checking: bool
:ivar git_implementation: Git libraries used to support various repository providers. Known
values are: "go-git" and "libgit2".
:vartype git_implementation: str or
~azure.mgmt.appplatform.v2023_12_01.models.GitImplementation
:ivar ca_cert_resource_id: Resource Id of CA certificate for https URL of Git repository.
:vartype ca_cert_resource_id: str
"""
_validation = {
"name": {"required": True},
"patterns": {"required": True},
"uri": {"required": True},
"label": {"required": True},
}
_attribute_map = {
"name": {"key": "name", "type": "str"},
"patterns": {"key": "patterns", "type": "[str]"},
"uri": {"key": "uri", "type": "str"},
"label": {"key": "label", "type": "str"},
"search_paths": {"key": "searchPaths", "type": "[str]"},
"username": {"key": "username", "type": "str"},
"password": {"key": "password", "type": "str"},
"host_key": {"key": "hostKey", "type": "str"},
"host_key_algorithm": {"key": "hostKeyAlgorithm", "type": "str"},
"private_key": {"key": "privateKey", "type": "str"},
"strict_host_key_checking": {"key": "strictHostKeyChecking", "type": "bool"},
"git_implementation": {"key": "gitImplementation", "type": "str"},
"ca_cert_resource_id": {"key": "caCertResourceId", "type": "str"},
}
def __init__(
self,
*,
name: str,
patterns: List[str],
uri: str,
label: str,
search_paths: Optional[List[str]] = None,
username: Optional[str] = None,
password: Optional[str] = None,
host_key: Optional[str] = None,
host_key_algorithm: Optional[str] = None,
private_key: Optional[str] = None,
strict_host_key_checking: Optional[bool] = None,
git_implementation: Optional[Union[str, "_models.GitImplementation"]] = None,
ca_cert_resource_id: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword name: Name of the repository. Required.
:paramtype name: str
:keyword patterns: Collection of patterns of the repository. Required.
:paramtype patterns: list[str]
:keyword uri: URI of the repository. Required.
:paramtype uri: str
:keyword label: Label of the repository. Required.
:paramtype label: str
:keyword search_paths: Searching path of the repository.
:paramtype search_paths: list[str]
:keyword username: Username of git repository basic auth.
:paramtype username: str
:keyword password: Password of git repository basic auth.
:paramtype password: str
:keyword host_key: Public sshKey of git repository.
:paramtype host_key: str
:keyword host_key_algorithm: SshKey algorithm of git repository.
:paramtype host_key_algorithm: str
:keyword private_key: Private sshKey algorithm of git repository.
:paramtype private_key: str
:keyword strict_host_key_checking: Strict host key checking or not.
:paramtype strict_host_key_checking: bool
:keyword git_implementation: Git libraries used to support various repository providers. Known
values are: "go-git" and "libgit2".
:paramtype git_implementation: str or
~azure.mgmt.appplatform.v2023_12_01.models.GitImplementation
:keyword ca_cert_resource_id: Resource Id of CA certificate for https URL of Git repository.
:paramtype ca_cert_resource_id: str
"""
super().__init__(**kwargs)
self.name = name
self.patterns = patterns
self.uri = uri
self.label = label
self.search_paths = search_paths
self.username = username
self.password = password
self.host_key = host_key
self.host_key_algorithm = host_key_algorithm
self.private_key = private_key
self.strict_host_key_checking = strict_host_key_checking
self.git_implementation = git_implementation
self.ca_cert_resource_id = ca_cert_resource_id
|
class ConfigurationServiceGitRepository(_serialization.Model):
'''Git repository property payload for Application Configuration Service.
All required parameters must be populated in order to send to server.
:ivar name: Name of the repository. Required.
:vartype name: str
:ivar patterns: Collection of patterns of the repository. Required.
:vartype patterns: list[str]
:ivar uri: URI of the repository. Required.
:vartype uri: str
:ivar label: Label of the repository. Required.
:vartype label: str
:ivar search_paths: Searching path of the repository.
:vartype search_paths: list[str]
:ivar username: Username of git repository basic auth.
:vartype username: str
:ivar password: Password of git repository basic auth.
:vartype password: str
:ivar host_key: Public sshKey of git repository.
:vartype host_key: str
:ivar host_key_algorithm: SshKey algorithm of git repository.
:vartype host_key_algorithm: str
:ivar private_key: Private sshKey algorithm of git repository.
:vartype private_key: str
:ivar strict_host_key_checking: Strict host key checking or not.
:vartype strict_host_key_checking: bool
:ivar git_implementation: Git libraries used to support various repository providers. Known
values are: "go-git" and "libgit2".
:vartype git_implementation: str or
~azure.mgmt.appplatform.v2023_12_01.models.GitImplementation
:ivar ca_cert_resource_id: Resource Id of CA certificate for https URL of Git repository.
:vartype ca_cert_resource_id: str
'''
def __init__(
self,
*,
name: str,
patterns: List[str],
uri: str,
label: str,
search_paths: Optional[List[str]] = None,
username: Optional[str] = None,
password: Optional[str] = None,
host_key: Optional[str] = None,
host_key_algorithm: Optional[str] = None,
private_key: Optional[str] = None,
strict_host_key_checking: Optional[bool] = None,
git_implementation: Optional[Union[str, "_models.GitImplementation"]] = None,
ca_cert_resource_id: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword name: Name of the repository. Required.
:paramtype name: str
:keyword patterns: Collection of patterns of the repository. Required.
:paramtype patterns: list[str]
:keyword uri: URI of the repository. Required.
:paramtype uri: str
:keyword label: Label of the repository. Required.
:paramtype label: str
:keyword search_paths: Searching path of the repository.
:paramtype search_paths: list[str]
:keyword username: Username of git repository basic auth.
:paramtype username: str
:keyword password: Password of git repository basic auth.
:paramtype password: str
:keyword host_key: Public sshKey of git repository.
:paramtype host_key: str
:keyword host_key_algorithm: SshKey algorithm of git repository.
:paramtype host_key_algorithm: str
:keyword private_key: Private sshKey algorithm of git repository.
:paramtype private_key: str
:keyword strict_host_key_checking: Strict host key checking or not.
:paramtype strict_host_key_checking: bool
:keyword git_implementation: Git libraries used to support various repository providers. Known
values are: "go-git" and "libgit2".
:paramtype git_implementation: str or
~azure.mgmt.appplatform.v2023_12_01.models.GitImplementation
:keyword ca_cert_resource_id: Resource Id of CA certificate for https URL of Git repository.
:paramtype ca_cert_resource_id: str
'''
pass
| 2 | 2 | 62 | 0 | 32 | 30 | 1 | 1.15 | 1 | 4 | 0 | 0 | 1 | 13 | 1 | 16 | 120 | 5 | 54 | 34 | 35 | 62 | 18 | 17 | 16 | 1 | 2 | 0 | 1 |
10,394 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigurationServiceGitPropertyValidateResult
|
class ConfigurationServiceGitPropertyValidateResult(_serialization.Model): # pylint: disable=name-too-long
"""Validation result for configuration service settings.
:ivar is_valid: Indicate if the configuration service settings are valid.
:vartype is_valid: bool
:ivar git_repos_validation_result: The detail validation results.
:vartype git_repos_validation_result:
list[~azure.mgmt.appplatform.v2023_12_01.models.ValidationMessages]
"""
_attribute_map = {
"is_valid": {"key": "isValid", "type": "bool"},
"git_repos_validation_result": {"key": "gitReposValidationResult", "type": "[ValidationMessages]"},
}
def __init__(
self,
*,
is_valid: Optional[bool] = None,
git_repos_validation_result: Optional[List["_models.ValidationMessages"]] = None,
**kwargs: Any
) -> None:
"""
:keyword is_valid: Indicate if the configuration service settings are valid.
:paramtype is_valid: bool
:keyword git_repos_validation_result: The detail validation results.
:paramtype git_repos_validation_result:
list[~azure.mgmt.appplatform.v2023_12_01.models.ValidationMessages]
"""
super().__init__(**kwargs)
self.is_valid = is_valid
self.git_repos_validation_result = git_repos_validation_result
|
class ConfigurationServiceGitPropertyValidateResult(_serialization.Model):
'''Validation result for configuration service settings.
:ivar is_valid: Indicate if the configuration service settings are valid.
:vartype is_valid: bool
:ivar git_repos_validation_result: The detail validation results.
:vartype git_repos_validation_result:
list[~azure.mgmt.appplatform.v2023_12_01.models.ValidationMessages]
'''
def __init__(
self,
*,
is_valid: Optional[bool] = None,
git_repos_validation_result: Optional[List["_models.ValidationMessages"]] = None,
**kwargs: Any
) -> None:
'''
:keyword is_valid: Indicate if the configuration service settings are valid.
:paramtype is_valid: bool
:keyword git_repos_validation_result: The detail validation results.
:paramtype git_repos_validation_result:
list[~azure.mgmt.appplatform.v2023_12_01.models.ValidationMessages]
'''
pass
| 2 | 2 | 17 | 0 | 10 | 7 | 1 | 1 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 32 | 3 | 15 | 11 | 7 | 15 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,395 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigurationServiceGitProperty
|
class ConfigurationServiceGitProperty(_serialization.Model):
"""Property of git environment.
:ivar repositories: Repositories of Application Configuration Service git property.
:vartype repositories:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGitRepository]
"""
_attribute_map = {
"repositories": {"key": "repositories", "type": "[ConfigurationServiceGitRepository]"},
}
def __init__(
self, *, repositories: Optional[List["_models.ConfigurationServiceGitRepository"]] = None, **kwargs: Any
) -> None:
"""
:keyword repositories: Repositories of Application Configuration Service git property.
:paramtype repositories:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGitRepository]
"""
super().__init__(**kwargs)
self.repositories = repositories
|
class ConfigurationServiceGitProperty(_serialization.Model):
'''Property of git environment.
:ivar repositories: Repositories of Application Configuration Service git property.
:vartype repositories:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGitRepository]
'''
def __init__(
self, *, repositories: Optional[List["_models.ConfigurationServiceGitRepository"]] = None, **kwargs: Any
) -> None:
'''
:keyword repositories: Repositories of Application Configuration Service git property.
:paramtype repositories:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceGitRepository]
'''
pass
| 2 | 2 | 10 | 0 | 5 | 5 | 1 | 1.11 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 22 | 3 | 9 | 6 | 5 | 10 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
10,396 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
|
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.ConfigServerSettingsValidateResult
|
class ConfigServerSettingsValidateResult(_serialization.Model):
"""Validation result for config server settings.
:ivar is_valid: Indicate if the config server settings are valid.
:vartype is_valid: bool
:ivar details: The detail validation results.
:vartype details:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsErrorRecord]
"""
_attribute_map = {
"is_valid": {"key": "isValid", "type": "bool"},
"details": {"key": "details", "type": "[ConfigServerSettingsErrorRecord]"},
}
def __init__(
self,
*,
is_valid: Optional[bool] = None,
details: Optional[List["_models.ConfigServerSettingsErrorRecord"]] = None,
**kwargs: Any
) -> None:
"""
:keyword is_valid: Indicate if the config server settings are valid.
:paramtype is_valid: bool
:keyword details: The detail validation results.
:paramtype details:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsErrorRecord]
"""
super().__init__(**kwargs)
self.is_valid = is_valid
self.details = details
|
class ConfigServerSettingsValidateResult(_serialization.Model):
'''Validation result for config server settings.
:ivar is_valid: Indicate if the config server settings are valid.
:vartype is_valid: bool
:ivar details: The detail validation results.
:vartype details:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsErrorRecord]
'''
def __init__(
self,
*,
is_valid: Optional[bool] = None,
details: Optional[List["_models.ConfigServerSettingsErrorRecord"]] = None,
**kwargs: Any
) -> None:
'''
:keyword is_valid: Indicate if the config server settings are valid.
:paramtype is_valid: bool
:keyword details: The detail validation results.
:paramtype details:
list[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsErrorRecord]
'''
pass
| 2 | 2 | 17 | 0 | 10 | 7 | 1 | 0.93 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 32 | 3 | 15 | 11 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,397 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._delete.Delete.FirewallsDelete
|
class FirewallsDelete(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class FirewallsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
10,398 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.firewall._create.Create.FirewallsCreateOrUpdate
|
class FirewallsCreateOrUpdate(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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}",
**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(
"firewallName", self.ctx.args.firewall_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", "2022-08-29",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
_elements = _builder.get(".identity.userAssignedIdentities{}")
if _elements is not None:
_elements.set_prop("clientId", AAZStrType, ".client_id")
_elements.set_prop("principalId", AAZStrType, ".principal_id")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("associatedRulestack",
AAZObjectType, ".associated_rulestack")
properties.set_prop("dnsSettings", AAZObjectType, ".dns_settings", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("frontEndSettings",
AAZListType, ".front_end_settings")
properties.set_prop("isPanoramaManaged",
AAZStrType, ".is_panorama_managed")
properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("networkProfile", AAZObjectType, ".network_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("panEtag", AAZStrType, ".pan_etag")
properties.set_prop(
"panoramaConfig", AAZObjectType, ".panorama_config")
properties.set_prop("planData", AAZObjectType, ".plan_data", typ_kwargs={
"flags": {"required": True}})
associated_rulestack = _builder.get(
".properties.associatedRulestack")
if associated_rulestack is not None:
associated_rulestack.set_prop(
"location", AAZStrType, ".location")
associated_rulestack.set_prop(
"resourceId", AAZStrType, ".resource_id")
associated_rulestack.set_prop(
"rulestackId", AAZStrType, ".rulestack_id")
dns_settings = _builder.get(".properties.dnsSettings")
if dns_settings is not None:
dns_settings.set_prop(
"dnsServers", AAZListType, ".dns_servers")
dns_settings.set_prop(
"enableDnsProxy", AAZStrType, ".enable_dns_proxy")
dns_settings.set_prop(
"enabledDnsType", AAZStrType, ".enabled_dns_type")
dns_servers = _builder.get(".properties.dnsSettings.dnsServers")
if dns_servers is not None:
_CreateHelper._build_schema_ip_address_create(
dns_servers.set_elements(AAZObjectType, "."))
front_end_settings = _builder.get(".properties.frontEndSettings")
if front_end_settings is not None:
front_end_settings.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.frontEndSettings[]")
if _elements is not None:
_CreateHelper._build_schema_endpoint_configuration_create(_elements.set_prop(
"backendConfiguration", AAZObjectType, ".backend_configuration", typ_kwargs={"flags": {"required": True}}))
_CreateHelper._build_schema_endpoint_configuration_create(_elements.set_prop(
"frontendConfiguration", AAZObjectType, ".frontend_configuration", typ_kwargs={"flags": {"required": True}}))
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("protocol", AAZStrType, ".protocol", typ_kwargs={
"flags": {"required": True}})
marketplace_details = _builder.get(
".properties.marketplaceDetails")
if marketplace_details is not None:
marketplace_details.set_prop(
"marketplaceSubscriptionStatus", AAZStrType, ".marketplace_subscription_status")
marketplace_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={
"flags": {"required": True}})
marketplace_details.set_prop("publisherId", AAZStrType, ".publisher_id", typ_kwargs={
"flags": {"required": True}})
network_profile = _builder.get(".properties.networkProfile")
if network_profile is not None:
network_profile.set_prop(
"egressNatIp", AAZListType, ".egress_nat_ip")
network_profile.set_prop("enableEgressNat", AAZStrType, ".enable_egress_nat", typ_kwargs={
"flags": {"required": True}})
network_profile.set_prop("networkType", AAZStrType, ".network_type", typ_kwargs={
"flags": {"required": True}})
network_profile.set_prop("publicIps", AAZListType, ".public_ips", typ_kwargs={
"flags": {"required": True}})
network_profile.set_prop(
"vnetConfiguration", AAZObjectType, ".vnet_configuration")
network_profile.set_prop(
"vwanConfiguration", AAZObjectType, ".vwan_configuration")
egress_nat_ip = _builder.get(
".properties.networkProfile.egressNatIp")
if egress_nat_ip is not None:
_CreateHelper._build_schema_ip_address_create(
egress_nat_ip.set_elements(AAZObjectType, "."))
public_ips = _builder.get(".properties.networkProfile.publicIps")
if public_ips is not None:
_CreateHelper._build_schema_ip_address_create(
public_ips.set_elements(AAZObjectType, "."))
vnet_configuration = _builder.get(
".properties.networkProfile.vnetConfiguration")
if vnet_configuration is not None:
_CreateHelper._build_schema_ip_address_create(vnet_configuration.set_prop(
"ipOfTrustSubnetForUdr", AAZObjectType, ".ip_of_trust_subnet_for_udr"))
_CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop(
"trustSubnet", AAZObjectType, ".trust_subnet", typ_kwargs={"flags": {"required": True}}))
_CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop(
"unTrustSubnet", AAZObjectType, ".un_trust_subnet", typ_kwargs={"flags": {"required": True}}))
_CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop(
"vnet", AAZObjectType, ".vnet", typ_kwargs={"flags": {"required": True}}))
vwan_configuration = _builder.get(
".properties.networkProfile.vwanConfiguration")
if vwan_configuration is not None:
_CreateHelper._build_schema_ip_address_create(vwan_configuration.set_prop(
"ipOfTrustSubnetForUdr", AAZObjectType, ".ip_of_trust_subnet_for_udr"))
vwan_configuration.set_prop(
"networkVirtualApplianceId", AAZStrType, ".network_virtual_appliance_id")
_CreateHelper._build_schema_ip_address_space_create(
vwan_configuration.set_prop("trustSubnet", AAZObjectType, ".trust_subnet"))
_CreateHelper._build_schema_ip_address_space_create(
vwan_configuration.set_prop("unTrustSubnet", AAZObjectType, ".un_trust_subnet"))
_CreateHelper._build_schema_ip_address_space_create(vwan_configuration.set_prop(
"vHub", AAZObjectType, ".v_hub", typ_kwargs={"flags": {"required": True}}))
panorama_config = _builder.get(".properties.panoramaConfig")
if panorama_config is not None:
panorama_config.set_prop("configString", AAZStrType, ".config_string", typ_kwargs={
"flags": {"required": True}})
plan_data = _builder.get(".properties.planData")
if plan_data is not None:
plan_data.set_prop("billingCycle", AAZStrType, ".billing_cycle", typ_kwargs={
"flags": {"required": True}})
plan_data.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={
"flags": {"required": True}})
plan_data.set_prop("usageType", AAZStrType, ".usage_type")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200_201.identity
identity.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()
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
)
properties = cls._schema_on_200_201.properties
properties.associated_rulestack = AAZObjectType(
serialized_name="associatedRulestack",
)
properties.dns_settings = AAZObjectType(
serialized_name="dnsSettings",
flags={"required": True},
)
properties.front_end_settings = AAZListType(
serialized_name="frontEndSettings",
)
properties.is_panorama_managed = AAZStrType(
serialized_name="isPanoramaManaged",
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
flags={"required": True},
)
properties.pan_etag = AAZStrType(
serialized_name="panEtag",
)
properties.panorama_config = AAZObjectType(
serialized_name="panoramaConfig",
)
properties.plan_data = AAZObjectType(
serialized_name="planData",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
associated_rulestack = cls._schema_on_200_201.properties.associated_rulestack
associated_rulestack.location = AAZStrType()
associated_rulestack.resource_id = AAZStrType(
serialized_name="resourceId",
)
associated_rulestack.rulestack_id = AAZStrType(
serialized_name="rulestackId",
)
dns_settings = cls._schema_on_200_201.properties.dns_settings
dns_settings.dns_servers = AAZListType(
serialized_name="dnsServers",
)
dns_settings.enable_dns_proxy = AAZStrType(
serialized_name="enableDnsProxy",
)
dns_settings.enabled_dns_type = AAZStrType(
serialized_name="enabledDnsType",
)
dns_servers = cls._schema_on_200_201.properties.dns_settings.dns_servers
dns_servers.Element = AAZObjectType()
_CreateHelper._build_schema_ip_address_read(dns_servers.Element)
front_end_settings = cls._schema_on_200_201.properties.front_end_settings
front_end_settings.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.front_end_settings.Element
_element.backend_configuration = AAZObjectType(
serialized_name="backendConfiguration",
flags={"required": True},
)
_CreateHelper._build_schema_endpoint_configuration_read(
_element.backend_configuration)
_element.frontend_configuration = AAZObjectType(
serialized_name="frontendConfiguration",
flags={"required": True},
)
_CreateHelper._build_schema_endpoint_configuration_read(
_element.frontend_configuration)
_element.name = AAZStrType(
flags={"required": True},
)
_element.protocol = AAZStrType(
flags={"required": True},
)
marketplace_details = cls._schema_on_200_201.properties.marketplace_details
marketplace_details.marketplace_subscription_id = AAZStrType(
serialized_name="marketplaceSubscriptionId",
flags={"read_only": True},
)
marketplace_details.marketplace_subscription_status = AAZStrType(
serialized_name="marketplaceSubscriptionStatus",
)
marketplace_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
marketplace_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
network_profile = cls._schema_on_200_201.properties.network_profile
network_profile.egress_nat_ip = AAZListType(
serialized_name="egressNatIp",
)
network_profile.enable_egress_nat = AAZStrType(
serialized_name="enableEgressNat",
flags={"required": True},
)
network_profile.network_type = AAZStrType(
serialized_name="networkType",
flags={"required": True},
)
network_profile.public_ips = AAZListType(
serialized_name="publicIps",
flags={"required": True},
)
network_profile.vnet_configuration = AAZObjectType(
serialized_name="vnetConfiguration",
)
network_profile.vwan_configuration = AAZObjectType(
serialized_name="vwanConfiguration",
)
egress_nat_ip = cls._schema_on_200_201.properties.network_profile.egress_nat_ip
egress_nat_ip.Element = AAZObjectType()
_CreateHelper._build_schema_ip_address_read(egress_nat_ip.Element)
public_ips = cls._schema_on_200_201.properties.network_profile.public_ips
public_ips.Element = AAZObjectType()
_CreateHelper._build_schema_ip_address_read(public_ips.Element)
vnet_configuration = cls._schema_on_200_201.properties.network_profile.vnet_configuration
vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_CreateHelper._build_schema_ip_address_read(
vnet_configuration.ip_of_trust_subnet_for_udr)
vnet_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
flags={"required": True},
)
_CreateHelper._build_schema_ip_address_space_read(
vnet_configuration.trust_subnet)
vnet_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
flags={"required": True},
)
_CreateHelper._build_schema_ip_address_space_read(
vnet_configuration.un_trust_subnet)
vnet_configuration.vnet = AAZObjectType(
flags={"required": True},
)
_CreateHelper._build_schema_ip_address_space_read(
vnet_configuration.vnet)
vwan_configuration = cls._schema_on_200_201.properties.network_profile.vwan_configuration
vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType(
serialized_name="ipOfTrustSubnetForUdr",
)
_CreateHelper._build_schema_ip_address_read(
vwan_configuration.ip_of_trust_subnet_for_udr)
vwan_configuration.network_virtual_appliance_id = AAZStrType(
serialized_name="networkVirtualApplianceId",
)
vwan_configuration.trust_subnet = AAZObjectType(
serialized_name="trustSubnet",
)
_CreateHelper._build_schema_ip_address_space_read(
vwan_configuration.trust_subnet)
vwan_configuration.un_trust_subnet = AAZObjectType(
serialized_name="unTrustSubnet",
)
_CreateHelper._build_schema_ip_address_space_read(
vwan_configuration.un_trust_subnet)
vwan_configuration.v_hub = AAZObjectType(
serialized_name="vHub",
flags={"required": True},
)
_CreateHelper._build_schema_ip_address_space_read(
vwan_configuration.v_hub)
panorama_config = cls._schema_on_200_201.properties.panorama_config
panorama_config.cg_name = AAZStrType(
serialized_name="cgName",
flags={"read_only": True},
)
panorama_config.config_string = AAZStrType(
serialized_name="configString",
flags={"required": True},
)
panorama_config.dg_name = AAZStrType(
serialized_name="dgName",
flags={"read_only": True},
)
panorama_config.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
panorama_config.panorama_server = AAZStrType(
serialized_name="panoramaServer",
flags={"read_only": True},
)
panorama_config.panorama_server2 = AAZStrType(
serialized_name="panoramaServer2",
flags={"read_only": True},
)
panorama_config.tpl_name = AAZStrType(
serialized_name="tplName",
flags={"read_only": True},
)
panorama_config.vm_auth_key = AAZStrType(
serialized_name="vmAuthKey",
flags={"read_only": True},
)
plan_data = cls._schema_on_200_201.properties.plan_data
plan_data.billing_cycle = AAZStrType(
serialized_name="billingCycle",
flags={"required": True},
)
plan_data.effective_date = AAZStrType(
serialized_name="effectiveDate",
flags={"read_only": True},
)
plan_data.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
plan_data.usage_type = AAZStrType(
serialized_name="usageType",
)
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 FirewallsCreateOrUpdate(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 | 49 | 4 | 45 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 514 | 53 | 461 | 65 | 442 | 0 | 238 | 56 | 227 | 19 | 1 | 1 | 31 |
10,399 |
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/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show_counter.py
|
azext_palo_alto_networks.aaz.latest.palo_alto.cloudngfw.local_rulestack.local_rule._show_counter.ShowCounter.LocalRulesGetCounters
|
class LocalRulesGetCounters(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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/getCounters",
**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(
"localRulestackName", self.ctx.args.local_rulestack_name,
required=True,
),
**self.serialize_url_param(
"priority", self.ctx.args.priority,
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(
"firewallName", self.ctx.args.firewall_name,
),
**self.serialize_query_param(
"api-version", "2022-08-29",
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.app_seen = AAZObjectType(
serialized_name="appSeen",
)
_schema_on_200.firewall_name = AAZStrType(
serialized_name="firewallName",
)
_schema_on_200.hit_count = AAZIntType(
serialized_name="hitCount",
)
_schema_on_200.last_updated_timestamp = AAZStrType(
serialized_name="lastUpdatedTimestamp",
)
_schema_on_200.priority = AAZStrType(
flags={"required": True},
)
_schema_on_200.request_timestamp = AAZStrType(
serialized_name="requestTimestamp",
)
_schema_on_200.rule_list_name = AAZStrType(
serialized_name="ruleListName",
)
_schema_on_200.rule_name = AAZStrType(
serialized_name="ruleName",
flags={"required": True},
)
_schema_on_200.rule_stack_name = AAZStrType(
serialized_name="ruleStackName",
)
_schema_on_200.timestamp = AAZStrType()
app_seen = cls._schema_on_200.app_seen
app_seen.app_seen_list = AAZListType(
serialized_name="appSeenList",
flags={"required": True},
)
app_seen.count = AAZIntType(
flags={"required": True},
)
app_seen_list = cls._schema_on_200.app_seen.app_seen_list
app_seen_list.Element = AAZObjectType()
_element = cls._schema_on_200.app_seen.app_seen_list.Element
_element.category = AAZStrType(
flags={"required": True},
)
_element.risk = AAZStrType(
flags={"required": True},
)
_element.standard_ports = AAZStrType(
serialized_name="standardPorts",
flags={"required": True},
)
_element.sub_category = AAZStrType(
serialized_name="subCategory",
flags={"required": True},
)
_element.tag = AAZStrType(
flags={"required": True},
)
_element.technology = AAZStrType(
flags={"required": True},
)
_element.title = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class LocalRulesGetCounters(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 | 156 | 17 | 139 | 29 | 122 | 0 | 56 | 22 | 46 | 2 | 1 | 1 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.