id
int64 0
843k
| repository_name
stringlengths 7
55
| file_path
stringlengths 9
332
| class_name
stringlengths 3
290
| human_written_code
stringlengths 12
4.36M
| class_skeleton
stringlengths 19
2.2M
| total_program_units
int64 1
9.57k
| total_doc_str
int64 0
4.2k
| AvgCountLine
float64 0
7.89k
| AvgCountLineBlank
float64 0
300
| AvgCountLineCode
float64 0
7.89k
| AvgCountLineComment
float64 0
7.89k
| AvgCyclomatic
float64 0
130
| CommentToCodeRatio
float64 0
176
| CountClassBase
float64 0
48
| CountClassCoupled
float64 0
589
| CountClassCoupledModified
float64 0
581
| CountClassDerived
float64 0
5.37k
| CountDeclInstanceMethod
float64 0
4.2k
| CountDeclInstanceVariable
float64 0
299
| CountDeclMethod
float64 0
4.2k
| CountDeclMethodAll
float64 0
4.2k
| CountLine
float64 1
115k
| CountLineBlank
float64 0
9.01k
| CountLineCode
float64 0
94.4k
| CountLineCodeDecl
float64 0
46.1k
| CountLineCodeExe
float64 0
91.3k
| CountLineComment
float64 0
27k
| CountStmt
float64 1
93.2k
| CountStmtDecl
float64 0
46.1k
| CountStmtExe
float64 0
90.2k
| MaxCyclomatic
float64 0
759
| MaxInheritanceTree
float64 0
16
| MaxNesting
float64 0
34
| SumCyclomatic
float64 0
6k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,500 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/api_key/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.api_key._update.Update.ApiKeysCreateOrUpdate
|
class ApiKeysCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}",
**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(
"apiKeyName", self.ctx.args.api_key_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nginx_deployment_api_key_response_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class ApiKeysCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
8,501 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/api_key/_show.py
|
azext_nginx.aaz.latest.nginx.deployment.api_key._show.Show.ApiKeysGet
|
class ApiKeysGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}",
**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(
"apiKeyName", self.ctx.args.api_key_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.end_date_time = AAZStrType(
serialized_name="endDateTime",
)
properties.hint = AAZStrType(
flags={"read_only": True},
)
return cls._schema_on_200
|
class ApiKeysGet(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 | 105 | 15 | 90 | 27 | 73 | 0 | 40 | 20 | 30 | 2 | 1 | 1 | 11 |
8,502 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/api_key/_list.py
|
azext_nginx.aaz.latest.nginx.deployment.api_key._list.List.ApiKeysList
|
class ApiKeysList(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.end_date_time = AAZStrType(
serialized_name="endDateTime",
)
properties.hint = AAZStrType(
flags={"read_only": True},
)
return cls._schema_on_200
|
class ApiKeysList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 110 | 17 | 93 | 29 | 76 | 0 | 45 | 22 | 35 | 2 | 1 | 1 | 11 |
8,503 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/api_key/_delete.py
|
azext_nginx.aaz.latest.nginx.deployment.api_key._delete.Delete.ApiKeysDelete
|
class ApiKeysDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}",
**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(
"apiKeyName", self.ctx.args.api_key_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class ApiKeysDelete(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 |
8,504 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/api_key/_create.py
|
azext_nginx.aaz.latest.nginx.deployment.api_key._create.Create.ApiKeysCreateOrUpdate
|
class ApiKeysCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}",
**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(
"apiKeyName", self.ctx.args.api_key_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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": {"client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"endDateTime", AAZStrType, ".end_date_time")
properties.set_prop("secretText", AAZStrType, ".secret_text", typ_kwargs={
"flags": {"secret": 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()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.end_date_time = AAZStrType(
serialized_name="endDateTime",
)
properties.hint = AAZStrType(
flags={"read_only": True},
)
return cls._schema_on_200_201
|
class ApiKeysCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 124 | 18 | 106 | 31 | 87 | 0 | 48 | 23 | 37 | 2 | 1 | 1 | 13 |
8,505 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_wait.py
|
azext_nginx.aaz.latest.nginx.deployment._wait.Wait.DeploymentsGet
|
class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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.identity = AAZIdentityObjectType()
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.sku = AAZObjectType()
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
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()
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.auto_upgrade_profile = AAZObjectType(
serialized_name="autoUpgradeProfile",
)
properties.dataplane_api_endpoint = AAZStrType(
serialized_name="dataplaneApiEndpoint",
flags={"read_only": True},
)
properties.enable_diagnostics_support = AAZBoolType(
serialized_name="enableDiagnosticsSupport",
)
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.logging = AAZObjectType()
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
properties.nginx_app_protect = AAZObjectType(
serialized_name="nginxAppProtect",
)
properties.nginx_version = AAZStrType(
serialized_name="nginxVersion",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scaling_properties = AAZObjectType(
serialized_name="scalingProperties",
)
properties.user_profile = AAZObjectType(
serialized_name="userProfile",
)
auto_upgrade_profile = cls._schema_on_200.properties.auto_upgrade_profile
auto_upgrade_profile.upgrade_channel = AAZStrType(
serialized_name="upgradeChannel",
flags={"required": True},
)
logging = cls._schema_on_200.properties.logging
logging.storage_account = AAZObjectType(
serialized_name="storageAccount",
)
storage_account = cls._schema_on_200.properties.logging.storage_account
storage_account.account_name = AAZStrType(
serialized_name="accountName",
)
storage_account.container_name = AAZStrType(
serialized_name="containerName",
)
network_profile = cls._schema_on_200.properties.network_profile
network_profile.front_end_ip_configuration = AAZObjectType(
serialized_name="frontEndIPConfiguration",
)
network_profile.network_interface_configuration = AAZObjectType(
serialized_name="networkInterfaceConfiguration",
)
front_end_ip_configuration = cls._schema_on_200.properties.network_profile.front_end_ip_configuration
front_end_ip_configuration.private_ip_addresses = AAZListType(
serialized_name="privateIPAddresses",
)
front_end_ip_configuration.public_ip_addresses = AAZListType(
serialized_name="publicIPAddresses",
)
private_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses
private_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element
_element.private_ip_address = AAZStrType(
serialized_name="privateIPAddress",
)
_element.private_ip_allocation_method = AAZStrType(
serialized_name="privateIPAllocationMethod",
)
_element.subnet_id = AAZStrType(
serialized_name="subnetId",
)
public_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses
public_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element
_element.id = AAZStrType()
network_interface_configuration = cls._schema_on_200.properties.network_profile.network_interface_configuration
network_interface_configuration.subnet_id = AAZStrType(
serialized_name="subnetId",
)
nginx_app_protect = cls._schema_on_200.properties.nginx_app_protect
nginx_app_protect.web_application_firewall_settings = AAZObjectType(
serialized_name="webApplicationFirewallSettings",
flags={"required": True},
)
nginx_app_protect.web_application_firewall_status = AAZObjectType(
serialized_name="webApplicationFirewallStatus",
flags={"read_only": True},
)
web_application_firewall_settings = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_settings
web_application_firewall_settings.activation_state = AAZStrType(
serialized_name="activationState",
)
web_application_firewall_status = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_status
web_application_firewall_status.attack_signatures_package = AAZObjectType(
serialized_name="attackSignaturesPackage",
flags={"read_only": True},
)
_WaitHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.attack_signatures_package)
web_application_firewall_status.bot_signatures_package = AAZObjectType(
serialized_name="botSignaturesPackage",
flags={"read_only": True},
)
_WaitHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.bot_signatures_package)
web_application_firewall_status.component_versions = AAZObjectType(
serialized_name="componentVersions",
flags={"read_only": True},
)
web_application_firewall_status.threat_campaigns_package = AAZObjectType(
serialized_name="threatCampaignsPackage",
flags={"read_only": True},
)
_WaitHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.threat_campaigns_package)
component_versions = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_status.component_versions
component_versions.waf_engine_version = AAZStrType(
serialized_name="wafEngineVersion",
flags={"required": True},
)
component_versions.waf_nginx_version = AAZStrType(
serialized_name="wafNginxVersion",
flags={"required": True},
)
scaling_properties = cls._schema_on_200.properties.scaling_properties
scaling_properties.auto_scale_settings = AAZObjectType(
serialized_name="autoScaleSettings",
flags={"client_flatten": True},
)
scaling_properties.capacity = AAZIntType()
auto_scale_settings = cls._schema_on_200.properties.scaling_properties.auto_scale_settings
auto_scale_settings.profiles = AAZListType(
flags={"required": True},
)
profiles = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles.Element
_element.capacity = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
capacity = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles.Element.capacity
capacity.max = AAZIntType(
flags={"required": True},
)
capacity.min = AAZIntType(
flags={"required": True},
)
user_profile = cls._schema_on_200.properties.user_profile
user_profile.preferred_email = AAZStrType(
serialized_name="preferredEmail",
)
sku = cls._schema_on_200.sku
sku.name = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DeploymentsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 35 | 3 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 335 | 41 | 294 | 50 | 277 | 0 | 131 | 43 | 121 | 2 | 1 | 1 | 11 |
8,506 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py
|
azext_nginx.aaz.latest.nginx.deployment._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", AAZIdentityObjectType, ".identity")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("sku", AAZObjectType, ".sku")
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type")
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("autoUpgradeProfile",
AAZObjectType, ".auto_upgrade_profile")
properties.set_prop("enableDiagnosticsSupport",
AAZBoolType, ".enable_diagnostics")
properties.set_prop("logging", AAZObjectType, ".logging")
properties.set_prop(
"networkProfile", AAZObjectType, ".network_profile")
properties.set_prop("nginxAppProtect",
AAZObjectType, ".nginx_app_protect")
properties.set_prop("scalingProperties",
AAZObjectType, ".scaling_properties")
properties.set_prop(
"userProfile", AAZObjectType, ".user_profile")
auto_upgrade_profile = _builder.get(
".properties.autoUpgradeProfile")
if auto_upgrade_profile is not None:
auto_upgrade_profile.set_prop("upgradeChannel", AAZStrType, ".upgrade_channel", typ_kwargs={
"flags": {"required": True}})
logging = _builder.get(".properties.logging")
if logging is not None:
logging.set_prop("storageAccount",
AAZObjectType, ".storage_account")
storage_account = _builder.get(
".properties.logging.storageAccount")
if storage_account is not None:
storage_account.set_prop(
"accountName", AAZStrType, ".account_name")
storage_account.set_prop(
"containerName", AAZStrType, ".container_name")
network_profile = _builder.get(".properties.networkProfile")
if network_profile is not None:
network_profile.set_prop(
"frontEndIPConfiguration", AAZObjectType, ".front_end_ip_configuration")
network_profile.set_prop(
"networkInterfaceConfiguration", AAZObjectType, ".network_interface_configuration")
front_end_ip_configuration = _builder.get(
".properties.networkProfile.frontEndIPConfiguration")
if front_end_ip_configuration is not None:
front_end_ip_configuration.set_prop(
"privateIPAddresses", AAZListType, ".private_ip_addresses")
front_end_ip_configuration.set_prop(
"publicIPAddresses", AAZListType, ".public_ip_addresses")
private_ip_addresses = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses")
if private_ip_addresses is not None:
private_ip_addresses.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses[]")
if _elements is not None:
_elements.set_prop("privateIPAddress",
AAZStrType, ".private_ip_address")
_elements.set_prop("privateIPAllocationMethod",
AAZStrType, ".private_ip_allocation_method")
_elements.set_prop("subnetId", AAZStrType, ".subnet_id")
public_ip_addresses = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses")
if public_ip_addresses is not None:
public_ip_addresses.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
network_interface_configuration = _builder.get(
".properties.networkProfile.networkInterfaceConfiguration")
if network_interface_configuration is not None:
network_interface_configuration.set_prop(
"subnetId", AAZStrType, ".subnet_id")
nginx_app_protect = _builder.get(".properties.nginxAppProtect")
if nginx_app_protect is not None:
nginx_app_protect.set_prop("webApplicationFirewallSettings", AAZObjectType,
".web_application_firewall_settings", typ_kwargs={"flags": {"required": True}})
web_application_firewall_settings = _builder.get(
".properties.nginxAppProtect.webApplicationFirewallSettings")
if web_application_firewall_settings is not None:
web_application_firewall_settings.set_prop(
"activationState", AAZStrType, ".activation_state")
scaling_properties = _builder.get(".properties.scalingProperties")
if scaling_properties is not None:
scaling_properties.set_prop("autoScaleSettings", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
scaling_properties.set_prop(
"capacity", AAZIntType, ".capacity")
auto_scale_settings = _builder.get(
".properties.scalingProperties.autoScaleSettings")
if auto_scale_settings is not None:
auto_scale_settings.set_prop("profiles", AAZListType, ".profiles", typ_kwargs={
"flags": {"required": True}})
profiles = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles")
if profiles is not None:
profiles.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles[]")
if _elements is not None:
_elements.set_prop("capacity", AAZObjectType, ".capacity", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
capacity = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles[].capacity")
if capacity is not None:
capacity.set_prop("max", AAZIntType, ".max", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("min", AAZIntType, ".min", typ_kwargs={
"flags": {"required": True}})
user_profile = _builder.get(".properties.userProfile")
if user_profile is not None:
user_profile.set_prop(
"preferredEmail", AAZStrType, ".preferred_email")
sku = _builder.get(".sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 61 | 12 | 49 | 0 | 13 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 124 | 26 | 98 | 25 | 95 | 0 | 94 | 25 | 91 | 24 | 1 | 1 | 25 |
8,507 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py
|
azext_nginx.aaz.latest.nginx.deployment._update.Update.DeploymentsGet
|
class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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_nginx_deployment_read(
cls._schema_on_200)
return cls._schema_on_200
|
class DeploymentsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,508 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py
|
azext_nginx.aaz.latest.nginx.deployment._update.Update.DeploymentsCreateOrUpdate
|
class DeploymentsCreateOrUpdate(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nginx_deployment_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class DeploymentsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,509 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_show.py
|
azext_nginx.aaz.latest.nginx.deployment._show.Show.DeploymentsGet
|
class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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.identity = AAZIdentityObjectType()
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.sku = AAZObjectType()
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
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()
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.auto_upgrade_profile = AAZObjectType(
serialized_name="autoUpgradeProfile",
)
properties.dataplane_api_endpoint = AAZStrType(
serialized_name="dataplaneApiEndpoint",
flags={"read_only": True},
)
properties.enable_diagnostics_support = AAZBoolType(
serialized_name="enableDiagnosticsSupport",
)
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.logging = AAZObjectType()
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
properties.nginx_app_protect = AAZObjectType(
serialized_name="nginxAppProtect",
)
properties.nginx_version = AAZStrType(
serialized_name="nginxVersion",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scaling_properties = AAZObjectType(
serialized_name="scalingProperties",
)
properties.user_profile = AAZObjectType(
serialized_name="userProfile",
)
auto_upgrade_profile = cls._schema_on_200.properties.auto_upgrade_profile
auto_upgrade_profile.upgrade_channel = AAZStrType(
serialized_name="upgradeChannel",
flags={"required": True},
)
logging = cls._schema_on_200.properties.logging
logging.storage_account = AAZObjectType(
serialized_name="storageAccount",
)
storage_account = cls._schema_on_200.properties.logging.storage_account
storage_account.account_name = AAZStrType(
serialized_name="accountName",
)
storage_account.container_name = AAZStrType(
serialized_name="containerName",
)
network_profile = cls._schema_on_200.properties.network_profile
network_profile.front_end_ip_configuration = AAZObjectType(
serialized_name="frontEndIPConfiguration",
)
network_profile.network_interface_configuration = AAZObjectType(
serialized_name="networkInterfaceConfiguration",
)
front_end_ip_configuration = cls._schema_on_200.properties.network_profile.front_end_ip_configuration
front_end_ip_configuration.private_ip_addresses = AAZListType(
serialized_name="privateIPAddresses",
)
front_end_ip_configuration.public_ip_addresses = AAZListType(
serialized_name="publicIPAddresses",
)
private_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses
private_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element
_element.private_ip_address = AAZStrType(
serialized_name="privateIPAddress",
)
_element.private_ip_allocation_method = AAZStrType(
serialized_name="privateIPAllocationMethod",
)
_element.subnet_id = AAZStrType(
serialized_name="subnetId",
)
public_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses
public_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element
_element.id = AAZStrType()
network_interface_configuration = cls._schema_on_200.properties.network_profile.network_interface_configuration
network_interface_configuration.subnet_id = AAZStrType(
serialized_name="subnetId",
)
nginx_app_protect = cls._schema_on_200.properties.nginx_app_protect
nginx_app_protect.web_application_firewall_settings = AAZObjectType(
serialized_name="webApplicationFirewallSettings",
flags={"required": True},
)
nginx_app_protect.web_application_firewall_status = AAZObjectType(
serialized_name="webApplicationFirewallStatus",
flags={"read_only": True},
)
web_application_firewall_settings = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_settings
web_application_firewall_settings.activation_state = AAZStrType(
serialized_name="activationState",
)
web_application_firewall_status = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_status
web_application_firewall_status.attack_signatures_package = AAZObjectType(
serialized_name="attackSignaturesPackage",
flags={"read_only": True},
)
_ShowHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.attack_signatures_package)
web_application_firewall_status.bot_signatures_package = AAZObjectType(
serialized_name="botSignaturesPackage",
flags={"read_only": True},
)
_ShowHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.bot_signatures_package)
web_application_firewall_status.component_versions = AAZObjectType(
serialized_name="componentVersions",
flags={"read_only": True},
)
web_application_firewall_status.threat_campaigns_package = AAZObjectType(
serialized_name="threatCampaignsPackage",
flags={"read_only": True},
)
_ShowHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.threat_campaigns_package)
component_versions = cls._schema_on_200.properties.nginx_app_protect.web_application_firewall_status.component_versions
component_versions.waf_engine_version = AAZStrType(
serialized_name="wafEngineVersion",
flags={"required": True},
)
component_versions.waf_nginx_version = AAZStrType(
serialized_name="wafNginxVersion",
flags={"required": True},
)
scaling_properties = cls._schema_on_200.properties.scaling_properties
scaling_properties.auto_scale_settings = AAZObjectType(
serialized_name="autoScaleSettings",
flags={"client_flatten": True},
)
scaling_properties.capacity = AAZIntType()
auto_scale_settings = cls._schema_on_200.properties.scaling_properties.auto_scale_settings
auto_scale_settings.profiles = AAZListType(
flags={"required": True},
)
profiles = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles.Element
_element.capacity = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
capacity = cls._schema_on_200.properties.scaling_properties.auto_scale_settings.profiles.Element.capacity
capacity.max = AAZIntType(
flags={"required": True},
)
capacity.min = AAZIntType(
flags={"required": True},
)
user_profile = cls._schema_on_200.properties.user_profile
user_profile.preferred_email = AAZStrType(
serialized_name="preferredEmail",
)
sku = cls._schema_on_200.sku
sku.name = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DeploymentsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 35 | 3 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 335 | 41 | 294 | 50 | 277 | 0 | 131 | 43 | 121 | 2 | 1 | 1 | 11 |
8,510 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_list.py
|
azext_nginx.aaz.latest.nginx.deployment._list.List.DeploymentsListByResourceGroup
|
class DeploymentsListByResourceGroup(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/Nginx.NginxPlus/nginxDeployments",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-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.identity = AAZIdentityObjectType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_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()
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.auto_upgrade_profile = AAZObjectType(
serialized_name="autoUpgradeProfile",
)
properties.dataplane_api_endpoint = AAZStrType(
serialized_name="dataplaneApiEndpoint",
flags={"read_only": True},
)
properties.enable_diagnostics_support = AAZBoolType(
serialized_name="enableDiagnosticsSupport",
)
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.logging = AAZObjectType()
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
properties.nginx_app_protect = AAZObjectType(
serialized_name="nginxAppProtect",
)
properties.nginx_version = AAZStrType(
serialized_name="nginxVersion",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scaling_properties = AAZObjectType(
serialized_name="scalingProperties",
)
properties.user_profile = AAZObjectType(
serialized_name="userProfile",
)
auto_upgrade_profile = cls._schema_on_200.value.Element.properties.auto_upgrade_profile
auto_upgrade_profile.upgrade_channel = AAZStrType(
serialized_name="upgradeChannel",
flags={"required": True},
)
logging = cls._schema_on_200.value.Element.properties.logging
logging.storage_account = AAZObjectType(
serialized_name="storageAccount",
)
storage_account = cls._schema_on_200.value.Element.properties.logging.storage_account
storage_account.account_name = AAZStrType(
serialized_name="accountName",
)
storage_account.container_name = AAZStrType(
serialized_name="containerName",
)
network_profile = cls._schema_on_200.value.Element.properties.network_profile
network_profile.front_end_ip_configuration = AAZObjectType(
serialized_name="frontEndIPConfiguration",
)
network_profile.network_interface_configuration = AAZObjectType(
serialized_name="networkInterfaceConfiguration",
)
front_end_ip_configuration = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration
front_end_ip_configuration.private_ip_addresses = AAZListType(
serialized_name="privateIPAddresses",
)
front_end_ip_configuration.public_ip_addresses = AAZListType(
serialized_name="publicIPAddresses",
)
private_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses
private_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element
_element.private_ip_address = AAZStrType(
serialized_name="privateIPAddress",
)
_element.private_ip_allocation_method = AAZStrType(
serialized_name="privateIPAllocationMethod",
)
_element.subnet_id = AAZStrType(
serialized_name="subnetId",
)
public_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses
public_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element
_element.id = AAZStrType()
network_interface_configuration = cls._schema_on_200.value.Element.properties.network_profile.network_interface_configuration
network_interface_configuration.subnet_id = AAZStrType(
serialized_name="subnetId",
)
nginx_app_protect = cls._schema_on_200.value.Element.properties.nginx_app_protect
nginx_app_protect.web_application_firewall_settings = AAZObjectType(
serialized_name="webApplicationFirewallSettings",
flags={"required": True},
)
nginx_app_protect.web_application_firewall_status = AAZObjectType(
serialized_name="webApplicationFirewallStatus",
flags={"read_only": True},
)
web_application_firewall_settings = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_settings
web_application_firewall_settings.activation_state = AAZStrType(
serialized_name="activationState",
)
web_application_firewall_status = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_status
web_application_firewall_status.attack_signatures_package = AAZObjectType(
serialized_name="attackSignaturesPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.attack_signatures_package)
web_application_firewall_status.bot_signatures_package = AAZObjectType(
serialized_name="botSignaturesPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.bot_signatures_package)
web_application_firewall_status.component_versions = AAZObjectType(
serialized_name="componentVersions",
flags={"read_only": True},
)
web_application_firewall_status.threat_campaigns_package = AAZObjectType(
serialized_name="threatCampaignsPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.threat_campaigns_package)
component_versions = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_status.component_versions
component_versions.waf_engine_version = AAZStrType(
serialized_name="wafEngineVersion",
flags={"required": True},
)
component_versions.waf_nginx_version = AAZStrType(
serialized_name="wafNginxVersion",
flags={"required": True},
)
scaling_properties = cls._schema_on_200.value.Element.properties.scaling_properties
scaling_properties.auto_scale_settings = AAZObjectType(
serialized_name="autoScaleSettings",
flags={"client_flatten": True},
)
scaling_properties.capacity = AAZIntType()
auto_scale_settings = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings
auto_scale_settings.profiles = AAZListType(
flags={"required": True},
)
profiles = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles.Element
_element.capacity = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
capacity = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles.Element.capacity
capacity.max = AAZIntType(
flags={"required": True},
)
capacity.min = AAZIntType(
flags={"required": True},
)
user_profile = cls._schema_on_200.value.Element.properties.user_profile
user_profile.preferred_email = AAZStrType(
serialized_name="preferredEmail",
)
sku = cls._schema_on_200.value.Element.sku
sku.name = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DeploymentsListByResourceGroup(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 | 4 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 340 | 43 | 297 | 51 | 280 | 0 | 136 | 44 | 126 | 2 | 1 | 1 | 11 |
8,511 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_list.py
|
azext_nginx.aaz.latest.nginx.deployment._list.List.DeploymentsList
|
class DeploymentsList(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/Nginx.NginxPlus/nginxDeployments",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-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.identity = AAZIdentityObjectType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_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()
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.auto_upgrade_profile = AAZObjectType(
serialized_name="autoUpgradeProfile",
)
properties.dataplane_api_endpoint = AAZStrType(
serialized_name="dataplaneApiEndpoint",
flags={"read_only": True},
)
properties.enable_diagnostics_support = AAZBoolType(
serialized_name="enableDiagnosticsSupport",
)
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.logging = AAZObjectType()
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
properties.nginx_app_protect = AAZObjectType(
serialized_name="nginxAppProtect",
)
properties.nginx_version = AAZStrType(
serialized_name="nginxVersion",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scaling_properties = AAZObjectType(
serialized_name="scalingProperties",
)
properties.user_profile = AAZObjectType(
serialized_name="userProfile",
)
auto_upgrade_profile = cls._schema_on_200.value.Element.properties.auto_upgrade_profile
auto_upgrade_profile.upgrade_channel = AAZStrType(
serialized_name="upgradeChannel",
flags={"required": True},
)
logging = cls._schema_on_200.value.Element.properties.logging
logging.storage_account = AAZObjectType(
serialized_name="storageAccount",
)
storage_account = cls._schema_on_200.value.Element.properties.logging.storage_account
storage_account.account_name = AAZStrType(
serialized_name="accountName",
)
storage_account.container_name = AAZStrType(
serialized_name="containerName",
)
network_profile = cls._schema_on_200.value.Element.properties.network_profile
network_profile.front_end_ip_configuration = AAZObjectType(
serialized_name="frontEndIPConfiguration",
)
network_profile.network_interface_configuration = AAZObjectType(
serialized_name="networkInterfaceConfiguration",
)
front_end_ip_configuration = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration
front_end_ip_configuration.private_ip_addresses = AAZListType(
serialized_name="privateIPAddresses",
)
front_end_ip_configuration.public_ip_addresses = AAZListType(
serialized_name="publicIPAddresses",
)
private_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses
private_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element
_element.private_ip_address = AAZStrType(
serialized_name="privateIPAddress",
)
_element.private_ip_allocation_method = AAZStrType(
serialized_name="privateIPAllocationMethod",
)
_element.subnet_id = AAZStrType(
serialized_name="subnetId",
)
public_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses
public_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element
_element.id = AAZStrType()
network_interface_configuration = cls._schema_on_200.value.Element.properties.network_profile.network_interface_configuration
network_interface_configuration.subnet_id = AAZStrType(
serialized_name="subnetId",
)
nginx_app_protect = cls._schema_on_200.value.Element.properties.nginx_app_protect
nginx_app_protect.web_application_firewall_settings = AAZObjectType(
serialized_name="webApplicationFirewallSettings",
flags={"required": True},
)
nginx_app_protect.web_application_firewall_status = AAZObjectType(
serialized_name="webApplicationFirewallStatus",
flags={"read_only": True},
)
web_application_firewall_settings = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_settings
web_application_firewall_settings.activation_state = AAZStrType(
serialized_name="activationState",
)
web_application_firewall_status = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_status
web_application_firewall_status.attack_signatures_package = AAZObjectType(
serialized_name="attackSignaturesPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.attack_signatures_package)
web_application_firewall_status.bot_signatures_package = AAZObjectType(
serialized_name="botSignaturesPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.bot_signatures_package)
web_application_firewall_status.component_versions = AAZObjectType(
serialized_name="componentVersions",
flags={"read_only": True},
)
web_application_firewall_status.threat_campaigns_package = AAZObjectType(
serialized_name="threatCampaignsPackage",
flags={"read_only": True},
)
_ListHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.threat_campaigns_package)
component_versions = cls._schema_on_200.value.Element.properties.nginx_app_protect.web_application_firewall_status.component_versions
component_versions.waf_engine_version = AAZStrType(
serialized_name="wafEngineVersion",
flags={"required": True},
)
component_versions.waf_nginx_version = AAZStrType(
serialized_name="wafNginxVersion",
flags={"required": True},
)
scaling_properties = cls._schema_on_200.value.Element.properties.scaling_properties
scaling_properties.auto_scale_settings = AAZObjectType(
serialized_name="autoScaleSettings",
flags={"client_flatten": True},
)
scaling_properties.capacity = AAZIntType()
auto_scale_settings = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings
auto_scale_settings.profiles = AAZListType(
flags={"required": True},
)
profiles = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles.Element
_element.capacity = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
capacity = cls._schema_on_200.value.Element.properties.scaling_properties.auto_scale_settings.profiles.Element.capacity
capacity.max = AAZIntType(
flags={"required": True},
)
capacity.min = AAZIntType(
flags={"required": True},
)
user_profile = cls._schema_on_200.value.Element.properties.user_profile
user_profile.preferred_email = AAZStrType(
serialized_name="preferredEmail",
)
sku = cls._schema_on_200.value.Element.sku
sku.name = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DeploymentsList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 35 | 4 | 31 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 336 | 43 | 293 | 51 | 276 | 0 | 136 | 44 | 126 | 2 | 1 | 1 | 11 |
8,512 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_delete.py
|
azext_nginx.aaz.latest.nginx.deployment._delete.Delete.DeploymentsDelete
|
class DeploymentsDelete(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class DeploymentsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,513 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_list.py
|
azext_nginx.aaz.latest.nginx.deployment.certificate._list.List.CertificatesList
|
class CertificatesList(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/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(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_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.certificate_error = AAZObjectType(
serialized_name="certificateError",
)
properties.certificate_virtual_path = AAZStrType(
serialized_name="certificateVirtualPath",
)
properties.key_vault_secret_created = AAZStrType(
serialized_name="keyVaultSecretCreated",
flags={"read_only": True},
)
properties.key_vault_secret_id = AAZStrType(
serialized_name="keyVaultSecretId",
)
properties.key_vault_secret_version = AAZStrType(
serialized_name="keyVaultSecretVersion",
flags={"read_only": True},
)
properties.key_virtual_path = AAZStrType(
serialized_name="keyVirtualPath",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sha1_thumbprint = AAZStrType(
serialized_name="sha1Thumbprint",
flags={"read_only": True},
)
certificate_error = cls._schema_on_200.value.Element.properties.certificate_error
certificate_error.code = AAZStrType()
certificate_error.message = 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 CertificatesList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 161 | 19 | 142 | 31 | 125 | 0 | 63 | 24 | 53 | 2 | 1 | 1 | 11 |
8,514 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.certificate._update.Update.CertificatesCreateOrUpdate
|
class CertificatesCreateOrUpdate(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}",
**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(
"certificateName", self.ctx.args.certificate_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nginx_certificate_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class CertificatesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,515 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.certificate._update.Update.CertificatesGet
|
class CertificatesGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}",
**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(
"certificateName", self.ctx.args.certificate_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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_nginx_certificate_read(
cls._schema_on_200)
return cls._schema_on_200
|
class CertificatesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,516 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.certificate._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)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("certificateVirtualPath",
AAZStrType, ".certificate_path")
properties.set_prop("keyVaultSecretId",
AAZStrType, ".key_vault_secret_id")
properties.set_prop("keyVirtualPath", AAZStrType, ".key_path")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 9 | 1 | 8 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 20 | 4 | 16 | 5 | 13 | 0 | 12 | 5 | 9 | 2 | 1 | 1 | 3 |
8,517 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_update.py
|
azext_notification_hub.aaz.latest.notification_hub._update.Update.NotificationHubsCreateOrUpdate
|
class NotificationHubsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}",
**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(
"namespaceName", self.ctx.args.namespace_name,
required=True,
),
**self.serialize_url_param(
"notificationHubName", self.ctx.args.notification_hub_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", "2017-04-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_notification_hub_resource_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class NotificationHubsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
8,518 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_update.py
|
azext_notification_hub.aaz.latest.notification_hub._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("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"admCredential", AAZObjectType, ".adm_credential")
properties.set_prop(
"apnsCredential", AAZObjectType, ".apns_credential")
properties.set_prop("baiduCredential",
AAZObjectType, ".baidu_credential")
properties.set_prop(
"gcmCredential", AAZObjectType, ".gcm_credential")
properties.set_prop(
"mpnsCredential", AAZObjectType, ".mpns_credential")
properties.set_prop("name", AAZStrType,
".notification_hub_name")
properties.set_prop(
"wnsCredential", AAZObjectType, ".wns_credential")
adm_credential = _builder.get(".properties.admCredential")
if adm_credential is not None:
adm_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.admCredential.properties")
if properties is not None:
properties.set_prop(
"authTokenUrl", AAZStrType, ".auth_token_url")
properties.set_prop("clientId", AAZStrType, ".client_id")
properties.set_prop(
"clientSecret", AAZStrType, ".client_secret")
apns_credential = _builder.get(".properties.apnsCredential")
if apns_credential is not None:
apns_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.apnsCredential.properties")
if properties is not None:
properties.set_prop("apnsCertificate",
AAZStrType, ".apns_certificate")
properties.set_prop("appId", AAZStrType, ".app_id")
properties.set_prop("appName", AAZStrType, ".app_name")
properties.set_prop(
"certificateKey", AAZStrType, ".certificate_key")
properties.set_prop("endpoint", AAZStrType, ".endpoint")
properties.set_prop("keyId", AAZStrType, ".key_id")
properties.set_prop("thumbprint", AAZStrType, ".thumbprint")
properties.set_prop("token", AAZStrType, ".token")
baidu_credential = _builder.get(".properties.baiduCredential")
if baidu_credential is not None:
baidu_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.baiduCredential.properties")
if properties is not None:
properties.set_prop(
"baiduApiKey", AAZStrType, ".baidu_api_key")
properties.set_prop(
"baiduEndPoint", AAZStrType, ".baidu_end_point")
properties.set_prop(
"baiduSecretKey", AAZStrType, ".baidu_secret_key")
gcm_credential = _builder.get(".properties.gcmCredential")
if gcm_credential is not None:
gcm_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.gcmCredential.properties")
if properties is not None:
properties.set_prop("gcmEndpoint", AAZStrType, ".gcm_endpoint")
properties.set_prop(
"googleApiKey", AAZStrType, ".google_api_key")
mpns_credential = _builder.get(".properties.mpnsCredential")
if mpns_credential is not None:
mpns_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.mpnsCredential.properties")
if properties is not None:
properties.set_prop(
"certificateKey", AAZStrType, ".certificate_key")
properties.set_prop("mpnsCertificate",
AAZStrType, ".mpns_certificate")
properties.set_prop("thumbprint", AAZStrType, ".thumbprint")
wns_credential = _builder.get(".properties.wnsCredential")
if wns_credential is not None:
wns_credential.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties.wnsCredential.properties")
if properties is not None:
properties.set_prop("packageSid", AAZStrType, ".package_sid")
properties.set_prop("secretKey", AAZStrType, ".secret_key")
properties.set_prop("windowsLiveEndpoint",
AAZStrType, ".windows_live_endpoint")
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 | 46 | 8 | 38 | 0 | 8 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 94 | 17 | 77 | 12 | 74 | 0 | 73 | 12 | 70 | 15 | 1 | 1 | 16 |
8,519 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_show.py
|
azext_notification_hub.aaz.latest.notification_hub._show.Show.NotificationHubsGet
|
class NotificationHubsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}",
**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(
"namespaceName", self.ctx.args.namespace_name,
required=True,
),
**self.serialize_url_param(
"notificationHubName", 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", "2017-04-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()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.sku = AAZObjectType()
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.adm_credential = AAZObjectType(
serialized_name="admCredential",
)
properties.apns_credential = AAZObjectType(
serialized_name="apnsCredential",
)
properties.authorization_rules = AAZListType(
serialized_name="authorizationRules",
)
properties.baidu_credential = AAZObjectType(
serialized_name="baiduCredential",
)
properties.gcm_credential = AAZObjectType(
serialized_name="gcmCredential",
)
properties.mpns_credential = AAZObjectType(
serialized_name="mpnsCredential",
)
properties.name = AAZStrType()
properties.registration_ttl = AAZStrType(
serialized_name="registrationTtl",
)
properties.wns_credential = AAZObjectType(
serialized_name="wnsCredential",
)
adm_credential = cls._schema_on_200.properties.adm_credential
adm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.adm_credential.properties
properties.auth_token_url = AAZStrType(
serialized_name="authTokenUrl",
)
properties.client_id = AAZStrType(
serialized_name="clientId",
)
properties.client_secret = AAZStrType(
serialized_name="clientSecret",
)
apns_credential = cls._schema_on_200.properties.apns_credential
apns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.apns_credential.properties
properties.apns_certificate = AAZStrType(
serialized_name="apnsCertificate",
)
properties.app_id = AAZStrType(
serialized_name="appId",
)
properties.app_name = AAZStrType(
serialized_name="appName",
)
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.endpoint = AAZStrType()
properties.key_id = AAZStrType(
serialized_name="keyId",
)
properties.thumbprint = AAZStrType()
properties.token = AAZStrType()
authorization_rules = cls._schema_on_200.properties.authorization_rules
authorization_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.authorization_rules.Element
_element.claim_type = AAZStrType(
serialized_name="claimType",
flags={"read_only": True},
)
_element.claim_value = AAZStrType(
serialized_name="claimValue",
flags={"read_only": True},
)
_element.created_time = AAZStrType(
serialized_name="createdTime",
flags={"read_only": True},
)
_element.key_name = AAZStrType(
serialized_name="keyName",
flags={"read_only": True},
)
_element.modified_time = AAZStrType(
serialized_name="modifiedTime",
flags={"read_only": True},
)
_element.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_element.revision = AAZIntType(
flags={"read_only": True},
)
_element.rights = AAZListType()
_element.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
rights = cls._schema_on_200.properties.authorization_rules.Element.rights
rights.Element = AAZStrType()
baidu_credential = cls._schema_on_200.properties.baidu_credential
baidu_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.baidu_credential.properties
properties.baidu_api_key = AAZStrType(
serialized_name="baiduApiKey",
)
properties.baidu_end_point = AAZStrType(
serialized_name="baiduEndPoint",
)
properties.baidu_secret_key = AAZStrType(
serialized_name="baiduSecretKey",
)
gcm_credential = cls._schema_on_200.properties.gcm_credential
gcm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.gcm_credential.properties
properties.gcm_endpoint = AAZStrType(
serialized_name="gcmEndpoint",
)
properties.google_api_key = AAZStrType(
serialized_name="googleApiKey",
)
mpns_credential = cls._schema_on_200.properties.mpns_credential
mpns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.mpns_credential.properties
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.mpns_certificate = AAZStrType(
serialized_name="mpnsCertificate",
)
properties.thumbprint = AAZStrType()
wns_credential = cls._schema_on_200.properties.wns_credential
wns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.properties.wns_credential.properties
properties.package_sid = AAZStrType(
serialized_name="packageSid",
)
properties.secret_key = AAZStrType(
serialized_name="secretKey",
)
properties.windows_live_endpoint = AAZStrType(
serialized_name="windowsLiveEndpoint",
)
sku = cls._schema_on_200.sku
sku.capacity = AAZIntType()
sku.family = AAZStrType()
sku.name = AAZStrType(
flags={"required": True},
)
sku.size = AAZStrType()
sku.tier = AAZStrType()
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NotificationHubsGet(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 | 29 | 2 | 27 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 281 | 32 | 249 | 38 | 232 | 0 | 112 | 31 | 102 | 2 | 1 | 1 | 11 |
8,520 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_list.py
|
azext_notification_hub.aaz.latest.notification_hub._list.List.NotificationHubsList
|
class NotificationHubsList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs",
**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(
"namespaceName", self.ctx.args.namespace_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", "2017-04-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType()
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.adm_credential = AAZObjectType(
serialized_name="admCredential",
)
properties.apns_credential = AAZObjectType(
serialized_name="apnsCredential",
)
properties.authorization_rules = AAZListType(
serialized_name="authorizationRules",
)
properties.baidu_credential = AAZObjectType(
serialized_name="baiduCredential",
)
properties.gcm_credential = AAZObjectType(
serialized_name="gcmCredential",
)
properties.mpns_credential = AAZObjectType(
serialized_name="mpnsCredential",
)
properties.name = AAZStrType()
properties.registration_ttl = AAZStrType(
serialized_name="registrationTtl",
)
properties.wns_credential = AAZObjectType(
serialized_name="wnsCredential",
)
adm_credential = cls._schema_on_200.value.Element.properties.adm_credential
adm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.adm_credential.properties
properties.auth_token_url = AAZStrType(
serialized_name="authTokenUrl",
)
properties.client_id = AAZStrType(
serialized_name="clientId",
)
properties.client_secret = AAZStrType(
serialized_name="clientSecret",
)
apns_credential = cls._schema_on_200.value.Element.properties.apns_credential
apns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.apns_credential.properties
properties.apns_certificate = AAZStrType(
serialized_name="apnsCertificate",
)
properties.app_id = AAZStrType(
serialized_name="appId",
)
properties.app_name = AAZStrType(
serialized_name="appName",
)
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.endpoint = AAZStrType()
properties.key_id = AAZStrType(
serialized_name="keyId",
)
properties.thumbprint = AAZStrType()
properties.token = AAZStrType()
authorization_rules = cls._schema_on_200.value.Element.properties.authorization_rules
authorization_rules.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.authorization_rules.Element
_element.claim_type = AAZStrType(
serialized_name="claimType",
flags={"read_only": True},
)
_element.claim_value = AAZStrType(
serialized_name="claimValue",
flags={"read_only": True},
)
_element.created_time = AAZStrType(
serialized_name="createdTime",
flags={"read_only": True},
)
_element.key_name = AAZStrType(
serialized_name="keyName",
flags={"read_only": True},
)
_element.modified_time = AAZStrType(
serialized_name="modifiedTime",
flags={"read_only": True},
)
_element.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_element.revision = AAZIntType(
flags={"read_only": True},
)
_element.rights = AAZListType()
_element.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
rights = cls._schema_on_200.value.Element.properties.authorization_rules.Element.rights
rights.Element = AAZStrType()
baidu_credential = cls._schema_on_200.value.Element.properties.baidu_credential
baidu_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.baidu_credential.properties
properties.baidu_api_key = AAZStrType(
serialized_name="baiduApiKey",
)
properties.baidu_end_point = AAZStrType(
serialized_name="baiduEndPoint",
)
properties.baidu_secret_key = AAZStrType(
serialized_name="baiduSecretKey",
)
gcm_credential = cls._schema_on_200.value.Element.properties.gcm_credential
gcm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.gcm_credential.properties
properties.gcm_endpoint = AAZStrType(
serialized_name="gcmEndpoint",
)
properties.google_api_key = AAZStrType(
serialized_name="googleApiKey",
)
mpns_credential = cls._schema_on_200.value.Element.properties.mpns_credential
mpns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.mpns_credential.properties
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.mpns_certificate = AAZStrType(
serialized_name="mpnsCertificate",
)
properties.thumbprint = AAZStrType()
wns_credential = cls._schema_on_200.value.Element.properties.wns_credential
wns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.properties.wns_credential.properties
properties.package_sid = AAZStrType(
serialized_name="packageSid",
)
properties.secret_key = AAZStrType(
serialized_name="secretKey",
)
properties.windows_live_endpoint = AAZStrType(
serialized_name="windowsLiveEndpoint",
)
sku = cls._schema_on_200.value.Element.sku
sku.capacity = AAZIntType()
sku.family = AAZStrType()
sku.name = AAZStrType(
flags={"required": True},
)
sku.size = AAZStrType()
sku.tier = AAZStrType()
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NotificationHubsList(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 | 30 | 3 | 27 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 286 | 34 | 252 | 39 | 235 | 0 | 117 | 32 | 107 | 2 | 1 | 1 | 11 |
8,521 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_delete.py
|
azext_notification_hub.aaz.latest.notification_hub._delete.Delete.NotificationHubsDelete
|
class NotificationHubsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}",
**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(
"namespaceName", self.ctx.args.namespace_name,
required=True,
),
**self.serialize_url_param(
"notificationHubName", 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", "2017-04-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
|
class NotificationHubsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
| 13 | 0 | 7 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 60 | 8 | 52 | 18 | 39 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
8,522 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_create.py
|
azext_notification_hub.aaz.latest.notification_hub._create.Create.NotificationHubsCreateOrUpdate
|
class NotificationHubsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}",
**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(
"namespaceName", self.ctx.args.namespace_name,
required=True,
),
**self.serialize_url_param(
"notificationHubName", 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", "2017-04-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("name", AAZStrType, ".name")
properties.set_prop("registrationTtl",
AAZStrType, ".registration_ttl")
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()
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.sku = AAZObjectType()
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.adm_credential = AAZObjectType(
serialized_name="admCredential",
)
properties.apns_credential = AAZObjectType(
serialized_name="apnsCredential",
)
properties.authorization_rules = AAZListType(
serialized_name="authorizationRules",
)
properties.baidu_credential = AAZObjectType(
serialized_name="baiduCredential",
)
properties.gcm_credential = AAZObjectType(
serialized_name="gcmCredential",
)
properties.mpns_credential = AAZObjectType(
serialized_name="mpnsCredential",
)
properties.name = AAZStrType()
properties.registration_ttl = AAZStrType(
serialized_name="registrationTtl",
)
properties.wns_credential = AAZObjectType(
serialized_name="wnsCredential",
)
adm_credential = cls._schema_on_200_201.properties.adm_credential
adm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.adm_credential.properties
properties.auth_token_url = AAZStrType(
serialized_name="authTokenUrl",
)
properties.client_id = AAZStrType(
serialized_name="clientId",
)
properties.client_secret = AAZStrType(
serialized_name="clientSecret",
)
apns_credential = cls._schema_on_200_201.properties.apns_credential
apns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.apns_credential.properties
properties.apns_certificate = AAZStrType(
serialized_name="apnsCertificate",
)
properties.app_id = AAZStrType(
serialized_name="appId",
)
properties.app_name = AAZStrType(
serialized_name="appName",
)
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.endpoint = AAZStrType()
properties.key_id = AAZStrType(
serialized_name="keyId",
)
properties.thumbprint = AAZStrType()
properties.token = AAZStrType()
authorization_rules = cls._schema_on_200_201.properties.authorization_rules
authorization_rules.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.authorization_rules.Element
_element.claim_type = AAZStrType(
serialized_name="claimType",
flags={"read_only": True},
)
_element.claim_value = AAZStrType(
serialized_name="claimValue",
flags={"read_only": True},
)
_element.created_time = AAZStrType(
serialized_name="createdTime",
flags={"read_only": True},
)
_element.key_name = AAZStrType(
serialized_name="keyName",
flags={"read_only": True},
)
_element.modified_time = AAZStrType(
serialized_name="modifiedTime",
flags={"read_only": True},
)
_element.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_element.revision = AAZIntType(
flags={"read_only": True},
)
_element.rights = AAZListType()
_element.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
rights = cls._schema_on_200_201.properties.authorization_rules.Element.rights
rights.Element = AAZStrType()
baidu_credential = cls._schema_on_200_201.properties.baidu_credential
baidu_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.baidu_credential.properties
properties.baidu_api_key = AAZStrType(
serialized_name="baiduApiKey",
)
properties.baidu_end_point = AAZStrType(
serialized_name="baiduEndPoint",
)
properties.baidu_secret_key = AAZStrType(
serialized_name="baiduSecretKey",
)
gcm_credential = cls._schema_on_200_201.properties.gcm_credential
gcm_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.gcm_credential.properties
properties.gcm_endpoint = AAZStrType(
serialized_name="gcmEndpoint",
)
properties.google_api_key = AAZStrType(
serialized_name="googleApiKey",
)
mpns_credential = cls._schema_on_200_201.properties.mpns_credential
mpns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.mpns_credential.properties
properties.certificate_key = AAZStrType(
serialized_name="certificateKey",
)
properties.mpns_certificate = AAZStrType(
serialized_name="mpnsCertificate",
)
properties.thumbprint = AAZStrType()
wns_credential = cls._schema_on_200_201.properties.wns_credential
wns_credential.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.properties.wns_credential.properties
properties.package_sid = AAZStrType(
serialized_name="packageSid",
)
properties.secret_key = AAZStrType(
serialized_name="secretKey",
)
properties.windows_live_endpoint = AAZStrType(
serialized_name="windowsLiveEndpoint",
)
sku = cls._schema_on_200_201.sku
sku.capacity = AAZIntType()
sku.family = AAZStrType()
sku.name = AAZStrType(
flags={"required": True},
)
sku.size = AAZStrType()
sku.tier = AAZStrType()
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class NotificationHubsCreateOrUpdate(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 | 28 | 3 | 26 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 306 | 36 | 270 | 43 | 251 | 0 | 125 | 35 | 114 | 3 | 1 | 1 | 14 |
8,523 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/_check_availability.py
|
azext_notification_hub.aaz.latest.notification_hub._check_availability.CheckAvailability.NotificationHubsCheckNotificationHubAvailability
|
class NotificationHubsCheckNotificationHubAvailability(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability",
**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(
"namespaceName", self.ctx.args.namespace_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", "2017-04-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("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.is_availiable = AAZBoolType(
serialized_name="isAvailiable",
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.sku = AAZObjectType()
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
sku = cls._schema_on_200.sku
sku.capacity = AAZIntType()
sku.family = AAZStrType()
sku.name = AAZStrType(
flags={"required": True},
)
sku.size = AAZStrType()
sku.tier = AAZStrType()
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NotificationHubsCheckNotificationHubAvailability(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 124 | 18 | 106 | 31 | 87 | 0 | 52 | 23 | 41 | 2 | 1 | 1 | 12 |
8,524 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/tests/latest/test_nginx_scenario.py
|
azext_nginx.tests.latest.test_nginx_scenario.NginxScenarioTest
|
class NginxScenarioTest(ScenarioTest):
@AllowLargeResponse(size_kb=10240)
@ResourceGroupPreparer(name_prefix='AZCLITestRG_', random_name_length=34, location='eastus2')
def test_nginx(self, resource_group):
self.kwargs.update({
'deployment_name': 'azcli-deployment',
'location': 'eastus2',
'rg': resource_group,
'sku': 'standardv2_Monthly_gmz7xq9ge3py',
'public_ip_name': 'azclitest-public-ip',
'vnet_name': 'azclitest-vnet',
'subnet_name': 'azclitest-subnet',
'subnet_name2_migrated': 'azclitest-subnet2',
'tags': 'tag1="value1" tag2="value2"',
'kv_name': self.create_random_name(prefix='cli', length=20),
'cert_name': 'azclitestcert',
'managed_identity': 'azclitestmi',
'autoscale_settings': '[{name:default,capacity:{min:10,max:30}}]',
'web_application_firewall_settings': '{activation-state:Enabled}',
'create_config_file': "[{content:aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIEhvc3QgJGhvc3Q7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SZWFsLUlQICRyZW1vdGVfYWRkcjsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVByb3h5LUFwcCBhcHA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgR2l0aHViLVJ1bi1JZCAwMDAwMDA7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcmluZyBvbjsKICAgICAgICAgICAgcHJveHlfYnVmZmVyX3NpemUgNGs7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcnMgOCA4azsKICAgICAgICAgICAgcHJveHlfcmVhZF90aW1lb3V0IDYwczsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vYXBwOwogICAgICAgICAgICBoZWFsdGhfY2hlY2s7CiAgICAgICAgfQogICAgICAgIAogICAgfQp9,virtual-path:/etc/nginx/nginx.conf}]",
'config_files': '[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtual-path":"/etc/nginx/nginx.conf"}]',
'protected_files': "[{'content':'aHR0cCB7DQogICAgc2VydmVyIHsNCiAgICAgICAgbGlzdGVuIDgwOw0KICAgICAgICByZXR1cm4gMjAwICdIZWxsbyBmcm9tIFByb3RlY3RlZCBGaWxlJzsNCiAgICB9DQp9','virtual-path':'/etc/nginx/protected.conf'}]",
'compressed_file': '{data:H4sIAAAAAAAAA+3VbWvbMBAHcL/Op7hCoTCIbckPCU0olG3QvVoog21QMCK+1qGyJGRlpBv57pPXbsla1wkdZS3c70UMdxfxP2wn6mqhVuFcq8vg2cTeKMt+Xb37V56zLGBpwvOYpVkyCmLGspwHED9fpI1l44QFCKzWrm9uV/+Vqpwz8GMA3tI0zqKoQRgzZHfF1net8K6Yp9eTP3WJonGFf3bUptag/YYWWBzGIQvT47G/wb1d1tvlt931w4C8KyB/UsCkt5v2drNHAyZdAZMnBcx7u6Pe7vh3wMHWwCaZXDQOFYwf3KRCiRrhTYgrURuJ/iei3sqt58IttIJo66hWiZdiKV3hbgyCw5WLKlfLyV8zFt3SKuBxDEfTg3cf3376OnsP7dzJtOInZyilhs/ayvJgGvnChTraHLDuyHD/eW0Zq1c3RYOuqFCUfuUz3Tg4rPznpH/wy/AchRx+mMGhxVo7LERZ2p1fmrWl4akxt29K17wRTQPtC3ccRR1D/ijpqmJe4fx698L8ZS3M91mY/8vCyctaONln4WT/hdeD9eB//xkQQgghhBBCCCGEEEIIIYQQQggh5FX6CfCArk8AKAAA}'
})
# Nginx for Azure Deployment
public_ip = self.cmd(
'network public-ip create --resource-group {rg} --location {location} --name {public_ip_name} --version IPv4 --sku Standard --zone 2').get_output_in_json()
# creating first vnet and first subnet
self.cmd(
'network vnet create --resource-group {rg} --location {location} --name {vnet_name} --address-prefixes 10.0.0.0/16 --subnet-name {subnet_name}').get_output_in_json()
self.cmd(
'network vnet subnet update --resource-group {rg} --name {subnet_name} --vnet-name {vnet_name} --delegations NGINX.NGINXPLUS/nginxDeployments')
# creating second subnet
self.cmd(
'network vnet subnet create --resource-group {rg} --name {subnet_name2_migrated} --vnet-name {vnet_name} --address-prefixes 10.0.1.0/24').get_output_in_json()
self.cmd(
'network vnet subnet update --resource-group {rg} --name {subnet_name2_migrated} --vnet-name {vnet_name} --delegations NGINX.NGINXPLUS/nginxDeployments')
self.kwargs['public_ip_addresses'] = "{public-ip-addresses:[{id:" + \
public_ip['publicIp']['id'] + "}]}"
subnet1 = self.cmd(
'network vnet subnet show --name {subnet_name} --vnet-name {vnet_name} --resource-group {rg}').get_output_in_json()
subnet2 = self.cmd(
'network vnet subnet show --name {subnet_name2_migrated} --vnet-name {vnet_name} --resource-group {rg}').get_output_in_json()
self.kwargs['subnet_id'] = "{subnet-id:" + subnet1['id'] + "}"
self.kwargs['subnet_id_migrated'] = "{subnet-id:" + subnet2['id'] + "}"
managed_identity = self.cmd(
'identity create --name {managed_identity} --resource-group {rg}').get_output_in_json()
identity_object_id = managed_identity['principalId']
self.kwargs.update({
'identity_object_id': identity_object_id,
})
self.kwargs['identities'] = "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"" + \
managed_identity['id'] + "\":{}}}"
self.cmd('nginx deployment create --name {deployment_name} --resource-group {rg} --location {location} --sku name={sku} --enable-diagnostics true --network-profile front-end-ip-configuration="{public_ip_addresses}" network-interface-configuration="{subnet_id}" --identity {identities} --scaling-properties capacity=10 --auto-upgrade-profile upgrade-channel=preview', checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', self.kwargs['deployment_name'])
])
deployment_list = self.cmd(
'nginx deployment list --resource-group {rg}',).get_output_in_json()
assert len(deployment_list) > 0
self.cmd('nginx deployment update --name {deployment_name} --resource-group {rg} --tags {tags} --enable-diagnostics false --scaling-properties profiles={autoscale_settings} --nginx-app-protect web-application-firewall-settings={web_application_firewall_settings}', checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', self.kwargs['deployment_name'])
])
self.cmd(
'nginx deployment wait --updated --name {deployment_name} --resource-group {rg}')
updated_deployment = self.cmd(
'nginx deployment show --name {deployment_name} --resource-group {rg}').get_output_in_json()
assert updated_deployment['tags'] is not None
assert updated_deployment['properties']['enableDiagnosticsSupport'] is False
# migrating to subnet 2
self.cmd('nginx deployment update --name {deployment_name} --resource-group {rg} --network-profile front-end-ip-configuration="{public_ip_addresses}" network-interface-configuration="{subnet_id_migrated}"', checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', self.kwargs['deployment_name'])
])
self.cmd(
'nginx deployment wait --updated --name {deployment_name} --resource-group {rg}')
updated_deployment = self.cmd(
'nginx deployment show --name {deployment_name} --resource-group {rg}').get_output_in_json()
assert updated_deployment['properties']['networkProfile']['networkInterfaceConfiguration']['subnetId'] == subnet2['id']
# Nginx for Azure API key
create_api_key = 'nginx deployment api-key create -n "test-key" --deployment-name {deployment_name} --resource-group {rg} --end-date-time "2025-05-20T17:59:39.123Z" --secret-text "s5V/9~o^4TYCVwmNc2Y>Y1^64&T`0sXg-j9!Xy|8"'
self.cmd(create_api_key)
# Nginx for Azure certificates
create_keyvault = 'keyvault create --name {kv_name} --resource-group {rg}'
kv = self.cmd(create_keyvault, checks=[
self.check('properties.provisioningState', 'Succeeded')
]).get_output_in_json()
kv_resource_id = kv['id']
assert kv_resource_id is not None
self.kwargs.update({
'kv_resource_id': kv_resource_id,
})
policy = self.cmd(
'keyvault certificate get-default-policy').get_output_in_json()
self.kwargs['policy'] = policy
with open('policy.json', 'w') as json_file:
json.dump(policy, json_file)
self.cmd(
'keyvault certificate create --vault-name {kv_name} -n {cert_name} -p @policy.json')
certificate = self.cmd(
'keyvault certificate show --name {cert_name} --vault-name {kv_name}').get_output_in_json()
self.kwargs['kv_secret_id'] = certificate['sid']
self.kwargs['mi_principal_id'] = self.cmd(
'identity show --name {managed_identity} --resource-group {rg}').get_output_in_json()['principalId']
with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid):
self.cmd(
"role assignment create --role 'Key Vault Administrator' --assignee-object-id {identity_object_id} --scope {kv_resource_id} --assignee-principal-type 'ServicePrincipal'")
if self.is_live:
print('=-=-=-=-=-=-=-=-= into the is live')
print('-=-=-=-=-=-=-=-= Sleeping for 30 seconds to wait for the role assignment to propagate')
time.sleep(30) # wait for the role assignment to propagate
self.cmd('nginx deployment certificate create --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --certificate-path /etc/nginx/test.cert --key-path /etc/nginx/test.key --key-vault-secret-id {kv_secret_id}', checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', self.kwargs['cert_name']),
self.check('properties.keyVaultSecretId',
self.kwargs['kv_secret_id'])
])
cert_list = self.cmd(
'nginx deployment certificate list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json()
assert len(cert_list) > 0
self.cmd('nginx deployment certificate update --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --certificate-path /etc/nginx/testupdated.cert --key-path /etc/nginx/testupdated.key', checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', self.kwargs['cert_name']),
self.check('properties.keyVaultSecretId',
self.kwargs['kv_secret_id'])
])
self.cmd(
'nginx deployment certificate wait --updated --name {cert_name} --deployment-name {deployment_name} --resource-group {rg}')
self.cmd('nginx deployment certificate show --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg}', checks=[
self.check('name', self.kwargs['cert_name']),
self.check('properties.certificateVirtualPath',
'/etc/nginx/testupdated.cert'),
self.check('properties.keyVirtualPath',
'/etc/nginx/testupdated.key')
])
self.cmd(
'nginx deployment certificate delete --name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --yes')
cert_list = self.cmd(
'nginx deployment certificate list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json()
assert len(cert_list) == 0
# Nginx for Azure configuration
self.cmd("nginx deployment configuration create --name default --deployment-name {deployment_name} --resource-group {rg} --root-file /etc/nginx/nginx.conf --files {create_config_file}", checks=[
self.check('properties.provisioningState', 'Succeeded'),
self.check('name', 'default'),
])
config_list = self.cmd(
'nginx deployment configuration list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json()
assert len(config_list) > 0
update_config = 'nginx deployment configuration update --name default --deployment-name {deployment_name} --resource-group {rg} --root-file nginx.conf --package data=H4sIAAAAAAAAA+3VbWvbMBAHcL/Op7hCoTCIbckPCU0olG3QvVoog21QMCK+1qGyJGRlpBv57pPXbsla1wkdZS3c70UMdxfxP2wn6mqhVuFcq8vg2cTeKMt+Xb37V56zLGBpwvOYpVkyCmLGspwHED9fpI1l44QFCKzWrm9uV/+Vqpwz8GMA3tI0zqKoQRgzZHfF1net8K6Yp9eTP3WJonGFf3bUptag/YYWWBzGIQvT47G/wb1d1tvlt931w4C8KyB/UsCkt5v2drNHAyZdAZMnBcx7u6Pe7vh3wMHWwCaZXDQOFYwf3KRCiRrhTYgrURuJ/iei3sqt58IttIJo66hWiZdiKV3hbgyCw5WLKlfLyV8zFt3SKuBxDEfTg3cf3376OnsP7dzJtOInZyilhs/ayvJgGvnChTraHLDuyHD/eW0Zq1c3RYOuqFCUfuUz3Tg4rPznpH/wy/AchRx+mMGhxVo7LERZ2p1fmrWl4akxt29K17wRTQPtC3ccRR1D/ijpqmJe4fx698L8ZS3M91mY/8vCyctaONln4WT/hdeD9eB//xkQQgghhBBCCCGEEEIIIYQQQggh5FX6CfCArk8AKAAA'
self.cmd(update_config, checks=[
self.check('name', 'default'),
])
update_config = 'nginx deployment configuration update --name default --deployment-name {deployment_name} --resource-group {rg} --root-file /etc/nginx/nginx.conf --files {create_config_file} --protected-files {protected_files}'
self.cmd(update_config, checks=[
self.check('name', 'default'),
])
self.cmd(
'nginx deployment configuration delete --name default --deployment-name {deployment_name} --resource-group {rg} --yes')
self.cmd('nginx deployment configuration analyze --name default --deployment-name {deployment_name} --resource-group {rg} --root-file nginx.conf --package {compressed_file}', checks=[
self.check('status', 'SUCCEEDED'),
])
self.cmd(
'nginx deployment delete --name {deployment_name} --resource-group {rg} --yes')
deployment_list = self.cmd(
'nginx deployment list --resource-group {rg}').get_output_in_json()
assert len(deployment_list) == 0
|
class NginxScenarioTest(ScenarioTest):
@AllowLargeResponse(size_kb=10240)
@ResourceGroupPreparer(name_prefix='AZCLITestRG_', random_name_length=34, location='eastus2')
def test_nginx(self, resource_group):
pass
| 4 | 0 | 144 | 12 | 125 | 8 | 2 | 0.06 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 147 | 12 | 128 | 20 | 124 | 8 | 71 | 18 | 69 | 2 | 1 | 1 | 2 |
8,525 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_create.py
|
azext_nsp.aaz.latest.network.perimeter.association._create.Create.NspAssociationsCreateOrUpdate
|
class NspAssociationsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("name", AAZStrType, ".association_name")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("accessMode", AAZStrType, ".access_mode")
_CreateHelper._build_schema_sub_resource_create(properties.set_prop(
"privateLinkResource", AAZObjectType, ".private_link_resource"))
_CreateHelper._build_schema_sub_resource_create(
properties.set_prop("profile", AAZObjectType, ".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.location = AAZStrType()
_schema_on_200_201.name = AAZStrType()
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.access_mode = AAZStrType(
serialized_name="accessMode",
)
properties.has_provisioning_issues = AAZStrType(
serialized_name="hasProvisioningIssues",
flags={"read_only": True},
)
properties.private_link_resource = AAZObjectType(
serialized_name="privateLinkResource",
)
_CreateHelper._build_schema_sub_resource_read(
properties.private_link_resource)
properties.profile = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(properties.profile)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class NspAssociationsCreateOrUpdate(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 | 12 | 1 | 12 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 146 | 20 | 126 | 33 | 107 | 0 | 64 | 25 | 53 | 3 | 1 | 1 | 14 |
8,526 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/custom.py
|
azext_nginx.custom.ConfigurationUpdate.ConfigurationsGet
|
class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-01-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_nginx_configuration_read(
cls._schema_on_200)
return cls._schema_on_200
|
class ConfigurationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,527 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._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)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("files", AAZListType, ".files")
properties.set_prop("package", AAZObjectType, ".package")
properties.set_prop(
"protectedFiles", AAZListType, ".protected_files")
properties.set_prop("rootFile", AAZStrType, ".root_file")
files = _builder.get(".properties.files")
if files is not None:
files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.files[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
package = _builder.get(".properties.package")
if package is not None:
package.set_prop("data", AAZStrType, ".data")
package.set_prop("protectedFiles",
AAZListType, ".protected_files")
protected_files = _builder.get(
".properties.package.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZStrType, ".")
protected_files = _builder.get(".properties.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.protectedFiles[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content", typ_kwargs={
"flags": {"secret": True}})
_elements.set_prop("contentHash", AAZStrType, ".content_hash")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 23 | 4 | 19 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 49 | 10 | 39 | 9 | 36 | 0 | 35 | 9 | 32 | 8 | 1 | 1 | 9 |
8,528 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._update.Update.ConfigurationsGet
|
class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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_nginx_configuration_response_read(
cls._schema_on_200)
return cls._schema_on_200
|
class ConfigurationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,529 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._update.Update.ConfigurationsCreateOrUpdate
|
class ConfigurationsCreateOrUpdate(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nginx_configuration_response_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class ConfigurationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,530 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_list.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._list.List.ConfigurationsList
|
class ConfigurationsList(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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.files = AAZListType()
properties.package = AAZObjectType()
properties.protected_files = AAZListType(
serialized_name="protectedFiles",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.root_file = AAZStrType(
serialized_name="rootFile",
)
files = cls._schema_on_200.value.Element.properties.files
files.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.files.Element
_element.content = AAZStrType()
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
package = cls._schema_on_200.value.Element.properties.package
package.data = AAZStrType()
package.protected_files = AAZListType(
serialized_name="protectedFiles",
)
protected_files = cls._schema_on_200.value.Element.properties.package.protected_files
protected_files.Element = AAZStrType()
protected_files = cls._schema_on_200.value.Element.properties.protected_files
protected_files.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.protected_files.Element
_element.content_hash = AAZStrType(
serialized_name="contentHash",
)
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
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 ConfigurationsList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 17 | 2 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 169 | 24 | 145 | 33 | 128 | 0 | 71 | 26 | 61 | 2 | 1 | 1 | 11 |
8,531 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_delete.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._delete.Delete.ConfigurationsDelete
|
class ConfigurationsDelete(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class ConfigurationsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,532 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_create.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._create.Create.ConfigurationsCreateOrUpdate
|
class ConfigurationsCreateOrUpdate(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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": {"client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("files", AAZListType, ".files")
properties.set_prop("package", AAZObjectType, ".package")
properties.set_prop(
"protectedFiles", AAZListType, ".protected_files")
properties.set_prop("rootFile", AAZStrType, ".root_file")
files = _builder.get(".properties.files")
if files is not None:
files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.files[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
package = _builder.get(".properties.package")
if package is not None:
package.set_prop("data", AAZStrType, ".data")
package.set_prop("protectedFiles",
AAZListType, ".protected_files")
protected_files = _builder.get(
".properties.package.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZStrType, ".")
protected_files = _builder.get(".properties.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.protectedFiles[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content", typ_kwargs={
"flags": {"secret": True}})
_elements.set_prop("contentHash", AAZStrType, ".content_hash")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.files = AAZListType()
properties.package = AAZObjectType()
properties.protected_files = AAZListType(
serialized_name="protectedFiles",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.root_file = AAZStrType(
serialized_name="rootFile",
)
files = cls._schema_on_200_201.properties.files
files.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.files.Element
_element.content = AAZStrType()
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
package = cls._schema_on_200_201.properties.package
package.data = AAZStrType()
package.protected_files = AAZListType(
serialized_name="protectedFiles",
)
protected_files = cls._schema_on_200_201.properties.package.protected_files
protected_files.Element = AAZStrType()
protected_files = cls._schema_on_200_201.properties.protected_files
protected_files.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.protected_files.Element
_element.content_hash = AAZStrType(
serialized_name="contentHash",
)
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
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 ConfigurationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 21 | 2 | 19 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 229 | 31 | 198 | 41 | 179 | 0 | 100 | 32 | 89 | 8 | 1 | 1 | 20 |
8,533 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_analyze.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._analyze.Analyze.ConfigurationsAnalysis
|
class ConfigurationsAnalysis(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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": {"client_flatten": True}}
)
_builder.set_prop("config", AAZObjectType, ".",
typ_kwargs={"flags": {"required": True}})
config = _builder.get(".config")
if config is not None:
config.set_prop("files", AAZListType, ".files")
config.set_prop("package", AAZObjectType, ".package")
config.set_prop("protectedFiles", AAZListType,
".protected_files")
config.set_prop("rootFile", AAZStrType, ".root_file")
files = _builder.get(".config.files")
if files is not None:
files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".config.files[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
package = _builder.get(".config.package")
if package is not None:
package.set_prop("data", AAZStrType, ".data")
package.set_prop("protectedFiles",
AAZListType, ".protected_files")
protected_files = _builder.get(".config.package.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZStrType, ".")
protected_files = _builder.get(".config.protectedFiles")
if protected_files is not None:
protected_files.set_elements(AAZObjectType, ".")
_elements = _builder.get(".config.protectedFiles[]")
if _elements is not None:
_elements.set_prop("content", AAZStrType, ".content", typ_kwargs={
"flags": {"secret": True}})
_elements.set_prop("contentHash", AAZStrType, ".content_hash")
_elements.set_prop("virtualPath", AAZStrType, ".virtual_path")
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.data = AAZObjectType()
_schema_on_200.status = AAZStrType(
flags={"required": True},
)
data = cls._schema_on_200.data
data.diagnostics = AAZListType()
data.errors = AAZListType()
diagnostics = cls._schema_on_200.data.diagnostics
diagnostics.Element = AAZObjectType()
_element = cls._schema_on_200.data.diagnostics.Element
_element.category = AAZStrType()
_element.description = AAZStrType(
flags={"required": True},
)
_element.directive = AAZStrType(
flags={"required": True},
)
_element.file = AAZStrType(
flags={"required": True},
)
_element.id = AAZStrType()
_element.level = AAZStrType(
flags={"required": True},
)
_element.line = AAZFloatType(
flags={"required": True},
)
_element.message = AAZStrType(
flags={"required": True},
)
_element.rule = AAZStrType(
flags={"required": True},
)
errors = cls._schema_on_200.data.errors
errors.Element = AAZObjectType()
_element = cls._schema_on_200.data.errors.Element
_element.description = AAZStrType(
flags={"required": True},
)
_element.directive = AAZStrType(
flags={"required": True},
)
_element.file = AAZStrType(
flags={"required": True},
)
_element.id = AAZStrType()
_element.line = AAZFloatType(
flags={"required": True},
)
_element.message = AAZStrType(
flags={"required": True},
)
_element.rule = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class ConfigurationsAnalysis(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 17 | 2 | 16 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 196 | 28 | 168 | 38 | 149 | 0 | 92 | 30 | 81 | 8 | 1 | 1 | 19 |
8,534 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_wait.py
|
azext_nginx.aaz.latest.nginx.deployment.certificate._wait.Wait.CertificatesGet
|
class CertificatesGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}",
**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(
"certificateName", self.ctx.args.certificate_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_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.certificate_error = AAZObjectType(
serialized_name="certificateError",
)
properties.certificate_virtual_path = AAZStrType(
serialized_name="certificateVirtualPath",
)
properties.key_vault_secret_created = AAZStrType(
serialized_name="keyVaultSecretCreated",
flags={"read_only": True},
)
properties.key_vault_secret_id = AAZStrType(
serialized_name="keyVaultSecretId",
)
properties.key_vault_secret_version = AAZStrType(
serialized_name="keyVaultSecretVersion",
flags={"read_only": True},
)
properties.key_virtual_path = AAZStrType(
serialized_name="keyVirtualPath",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sha1_thumbprint = AAZStrType(
serialized_name="sha1Thumbprint",
flags={"read_only": True},
)
certificate_error = cls._schema_on_200.properties.certificate_error
certificate_error.code = AAZStrType()
certificate_error.message = 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 CertificatesGet(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 | 58 | 22 | 48 | 2 | 1 | 1 | 11 |
8,535 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_wait.py
|
azext_nginx.aaz.latest.nginx.deployment.configuration._wait.Wait.ConfigurationsGet
|
class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}",
**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(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"deploymentName", self.ctx.args.deployment_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-11-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.files = AAZListType()
properties.package = AAZObjectType()
properties.protected_files = AAZListType(
serialized_name="protectedFiles",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.root_file = AAZStrType(
serialized_name="rootFile",
)
files = cls._schema_on_200.properties.files
files.Element = AAZObjectType()
_element = cls._schema_on_200.properties.files.Element
_element.content = AAZStrType()
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
package = cls._schema_on_200.properties.package
package.data = AAZStrType()
package.protected_files = AAZListType(
serialized_name="protectedFiles",
)
protected_files = cls._schema_on_200.properties.package.protected_files
protected_files.Element = AAZStrType()
protected_files = cls._schema_on_200.properties.protected_files
protected_files.Element = AAZObjectType()
_element = cls._schema_on_200.properties.protected_files.Element
_element.content_hash = AAZStrType(
serialized_name="contentHash",
)
_element.virtual_path = AAZStrType(
serialized_name="virtualPath",
)
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 ConfigurationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 164 | 22 | 142 | 32 | 125 | 0 | 66 | 25 | 56 | 2 | 1 | 1 | 11 |
8,536 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_create.py
|
azext_nginx.aaz.latest.nginx.deployment._create.Create.DeploymentsCreateOrUpdate
|
class DeploymentsCreateOrUpdate(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}",
**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(
"deploymentName", self.ctx.args.deployment_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-11-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": {"client_flatten": True}}
)
_builder.set_prop("identity", AAZIdentityObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("sku", AAZObjectType, ".sku")
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type")
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={
"flags": {"action": "create"}})
identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={
"flags": {"action": "create"}})
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
user_assigned = _builder.get(".identity.userAssigned")
if user_assigned is not None:
user_assigned.set_elements(AAZStrType, ".")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("autoUpgradeProfile",
AAZObjectType, ".auto_upgrade_profile")
properties.set_prop("enableDiagnosticsSupport",
AAZBoolType, ".enable_diagnostics")
properties.set_prop("logging", AAZObjectType, ".logging")
properties.set_prop(
"networkProfile", AAZObjectType, ".network_profile")
properties.set_prop("nginxAppProtect",
AAZObjectType, ".nginx_app_protect")
properties.set_prop("scalingProperties",
AAZObjectType, ".scaling_properties")
properties.set_prop(
"userProfile", AAZObjectType, ".user_profile")
auto_upgrade_profile = _builder.get(
".properties.autoUpgradeProfile")
if auto_upgrade_profile is not None:
auto_upgrade_profile.set_prop("upgradeChannel", AAZStrType, ".upgrade_channel", typ_kwargs={
"flags": {"required": True}})
logging = _builder.get(".properties.logging")
if logging is not None:
logging.set_prop("storageAccount",
AAZObjectType, ".storage_account")
storage_account = _builder.get(
".properties.logging.storageAccount")
if storage_account is not None:
storage_account.set_prop(
"accountName", AAZStrType, ".account_name")
storage_account.set_prop(
"containerName", AAZStrType, ".container_name")
network_profile = _builder.get(".properties.networkProfile")
if network_profile is not None:
network_profile.set_prop(
"frontEndIPConfiguration", AAZObjectType, ".front_end_ip_configuration")
network_profile.set_prop(
"networkInterfaceConfiguration", AAZObjectType, ".network_interface_configuration")
front_end_ip_configuration = _builder.get(
".properties.networkProfile.frontEndIPConfiguration")
if front_end_ip_configuration is not None:
front_end_ip_configuration.set_prop(
"privateIPAddresses", AAZListType, ".private_ip_addresses")
front_end_ip_configuration.set_prop(
"publicIPAddresses", AAZListType, ".public_ip_addresses")
private_ip_addresses = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses")
if private_ip_addresses is not None:
private_ip_addresses.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses[]")
if _elements is not None:
_elements.set_prop("privateIPAddress",
AAZStrType, ".private_ip_address")
_elements.set_prop("privateIPAllocationMethod",
AAZStrType, ".private_ip_allocation_method")
_elements.set_prop("subnetId", AAZStrType, ".subnet_id")
public_ip_addresses = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses")
if public_ip_addresses is not None:
public_ip_addresses.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
network_interface_configuration = _builder.get(
".properties.networkProfile.networkInterfaceConfiguration")
if network_interface_configuration is not None:
network_interface_configuration.set_prop(
"subnetId", AAZStrType, ".subnet_id")
nginx_app_protect = _builder.get(".properties.nginxAppProtect")
if nginx_app_protect is not None:
nginx_app_protect.set_prop("webApplicationFirewallSettings", AAZObjectType,
".web_application_firewall_settings", typ_kwargs={"flags": {"required": True}})
web_application_firewall_settings = _builder.get(
".properties.nginxAppProtect.webApplicationFirewallSettings")
if web_application_firewall_settings is not None:
web_application_firewall_settings.set_prop(
"activationState", AAZStrType, ".activation_state")
scaling_properties = _builder.get(".properties.scalingProperties")
if scaling_properties is not None:
scaling_properties.set_prop("autoScaleSettings", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
scaling_properties.set_prop(
"capacity", AAZIntType, ".capacity")
auto_scale_settings = _builder.get(
".properties.scalingProperties.autoScaleSettings")
if auto_scale_settings is not None:
auto_scale_settings.set_prop("profiles", AAZListType, ".profiles", typ_kwargs={
"flags": {"required": True}})
profiles = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles")
if profiles is not None:
profiles.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles[]")
if _elements is not None:
_elements.set_prop("capacity", AAZObjectType, ".capacity", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
capacity = _builder.get(
".properties.scalingProperties.autoScaleSettings.profiles[].capacity")
if capacity is not None:
capacity.set_prop("max", AAZIntType, ".max", typ_kwargs={
"flags": {"required": True}})
capacity.set_prop("min", AAZIntType, ".min", typ_kwargs={
"flags": {"required": True}})
user_profile = _builder.get(".properties.userProfile")
if user_profile is not None:
user_profile.set_prop(
"preferredEmail", AAZStrType, ".preferred_email")
sku = _builder.get(".sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZIdentityObjectType()
_schema_on_200_201.location = AAZStrType()
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.sku = AAZObjectType()
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
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()
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.auto_upgrade_profile = AAZObjectType(
serialized_name="autoUpgradeProfile",
)
properties.dataplane_api_endpoint = AAZStrType(
serialized_name="dataplaneApiEndpoint",
flags={"read_only": True},
)
properties.enable_diagnostics_support = AAZBoolType(
serialized_name="enableDiagnosticsSupport",
)
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.logging = AAZObjectType()
properties.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
properties.nginx_app_protect = AAZObjectType(
serialized_name="nginxAppProtect",
)
properties.nginx_version = AAZStrType(
serialized_name="nginxVersion",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.scaling_properties = AAZObjectType(
serialized_name="scalingProperties",
)
properties.user_profile = AAZObjectType(
serialized_name="userProfile",
)
auto_upgrade_profile = cls._schema_on_200_201.properties.auto_upgrade_profile
auto_upgrade_profile.upgrade_channel = AAZStrType(
serialized_name="upgradeChannel",
flags={"required": True},
)
logging = cls._schema_on_200_201.properties.logging
logging.storage_account = AAZObjectType(
serialized_name="storageAccount",
)
storage_account = cls._schema_on_200_201.properties.logging.storage_account
storage_account.account_name = AAZStrType(
serialized_name="accountName",
)
storage_account.container_name = AAZStrType(
serialized_name="containerName",
)
network_profile = cls._schema_on_200_201.properties.network_profile
network_profile.front_end_ip_configuration = AAZObjectType(
serialized_name="frontEndIPConfiguration",
)
network_profile.network_interface_configuration = AAZObjectType(
serialized_name="networkInterfaceConfiguration",
)
front_end_ip_configuration = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration
front_end_ip_configuration.private_ip_addresses = AAZListType(
serialized_name="privateIPAddresses",
)
front_end_ip_configuration.public_ip_addresses = AAZListType(
serialized_name="publicIPAddresses",
)
private_ip_addresses = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.private_ip_addresses
private_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element
_element.private_ip_address = AAZStrType(
serialized_name="privateIPAddress",
)
_element.private_ip_allocation_method = AAZStrType(
serialized_name="privateIPAllocationMethod",
)
_element.subnet_id = AAZStrType(
serialized_name="subnetId",
)
public_ip_addresses = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.public_ip_addresses
public_ip_addresses.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element
_element.id = AAZStrType()
network_interface_configuration = cls._schema_on_200_201.properties.network_profile.network_interface_configuration
network_interface_configuration.subnet_id = AAZStrType(
serialized_name="subnetId",
)
nginx_app_protect = cls._schema_on_200_201.properties.nginx_app_protect
nginx_app_protect.web_application_firewall_settings = AAZObjectType(
serialized_name="webApplicationFirewallSettings",
flags={"required": True},
)
nginx_app_protect.web_application_firewall_status = AAZObjectType(
serialized_name="webApplicationFirewallStatus",
flags={"read_only": True},
)
web_application_firewall_settings = cls._schema_on_200_201.properties.nginx_app_protect.web_application_firewall_settings
web_application_firewall_settings.activation_state = AAZStrType(
serialized_name="activationState",
)
web_application_firewall_status = cls._schema_on_200_201.properties.nginx_app_protect.web_application_firewall_status
web_application_firewall_status.attack_signatures_package = AAZObjectType(
serialized_name="attackSignaturesPackage",
flags={"read_only": True},
)
_CreateHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.attack_signatures_package)
web_application_firewall_status.bot_signatures_package = AAZObjectType(
serialized_name="botSignaturesPackage",
flags={"read_only": True},
)
_CreateHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.bot_signatures_package)
web_application_firewall_status.component_versions = AAZObjectType(
serialized_name="componentVersions",
flags={"read_only": True},
)
web_application_firewall_status.threat_campaigns_package = AAZObjectType(
serialized_name="threatCampaignsPackage",
flags={"read_only": True},
)
_CreateHelper._build_schema_web_application_firewall_package_read(
web_application_firewall_status.threat_campaigns_package)
component_versions = cls._schema_on_200_201.properties.nginx_app_protect.web_application_firewall_status.component_versions
component_versions.waf_engine_version = AAZStrType(
serialized_name="wafEngineVersion",
flags={"required": True},
)
component_versions.waf_nginx_version = AAZStrType(
serialized_name="wafNginxVersion",
flags={"required": True},
)
scaling_properties = cls._schema_on_200_201.properties.scaling_properties
scaling_properties.auto_scale_settings = AAZObjectType(
serialized_name="autoScaleSettings",
flags={"client_flatten": True},
)
scaling_properties.capacity = AAZIntType()
auto_scale_settings = cls._schema_on_200_201.properties.scaling_properties.auto_scale_settings
auto_scale_settings.profiles = AAZListType(
flags={"required": True},
)
profiles = cls._schema_on_200_201.properties.scaling_properties.auto_scale_settings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.scaling_properties.auto_scale_settings.profiles.Element
_element.capacity = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
capacity = cls._schema_on_200_201.properties.scaling_properties.auto_scale_settings.profiles.Element.capacity
capacity.max = AAZIntType(
flags={"required": True},
)
capacity.min = AAZIntType(
flags={"required": True},
)
user_profile = cls._schema_on_200_201.properties.user_profile
user_profile.preferred_email = AAZStrType(
serialized_name="preferredEmail",
)
sku = cls._schema_on_200_201.sku
sku.name = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class DeploymentsCreateOrUpdate(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 | 46 | 6 | 40 | 0 | 4 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 482 | 67 | 415 | 76 | 396 | 0 | 230 | 67 | 219 | 25 | 1 | 1 | 37 |
8,537 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_delete.py
|
azext_nsp.aaz.latest.network.perimeter.association._delete.Delete.NspAssociationsDelete
|
class NspAssociationsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class NspAssociationsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,538 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_show.py
|
azext_nsp.aaz.latest.network.perimeter.association._show.Show.NspAssociationsGet
|
class NspAssociationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.access_mode = AAZStrType(
serialized_name="accessMode",
)
properties.has_provisioning_issues = AAZStrType(
serialized_name="hasProvisioningIssues",
flags={"read_only": True},
)
properties.private_link_resource = AAZObjectType(
serialized_name="privateLinkResource",
)
_ShowHelper._build_schema_sub_resource_read(
properties.private_link_resource)
properties.profile = AAZObjectType()
_ShowHelper._build_schema_sub_resource_read(properties.profile)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NspAssociationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 119 | 16 | 103 | 28 | 86 | 0 | 49 | 21 | 39 | 2 | 1 | 1 | 11 |
8,539 |
Azure/azure-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/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._list.List.CloudExadataInfrastructuresListBySubscription
|
class CloudExadataInfrastructuresListBySubscription(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/cloudExadataInfrastructures",
**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},
)
_element.zones = AAZListType(
flags={"required": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.activated_storage_count = AAZIntType(
serialized_name="activatedStorageCount",
flags={"read_only": True},
)
properties.additional_storage_count = AAZIntType(
serialized_name="additionalStorageCount",
flags={"read_only": True},
)
properties.available_storage_size_in_gbs = AAZIntType(
serialized_name="availableStorageSizeInGbs",
flags={"read_only": True},
)
properties.compute_count = AAZIntType(
serialized_name="computeCount",
)
properties.cpu_count = AAZIntType(
serialized_name="cpuCount",
flags={"read_only": True},
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
flags={"read_only": True},
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
flags={"read_only": True},
)
properties.db_server_version = AAZStrType(
serialized_name="dbServerVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.estimated_patching_time = AAZObjectType(
serialized_name="estimatedPatchingTime",
)
properties.last_maintenance_run_id = AAZStrType(
serialized_name="lastMaintenanceRunId",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.maintenance_window = AAZObjectType(
serialized_name="maintenanceWindow",
)
properties.max_cpu_count = AAZIntType(
serialized_name="maxCpuCount",
flags={"read_only": True},
)
properties.max_data_storage_in_tbs = AAZFloatType(
serialized_name="maxDataStorageInTbs",
flags={"read_only": True},
)
properties.max_db_node_storage_size_in_gbs = AAZIntType(
serialized_name="maxDbNodeStorageSizeInGbs",
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.monthly_db_server_version = AAZStrType(
serialized_name="monthlyDbServerVersion",
flags={"read_only": True},
)
properties.monthly_storage_server_version = AAZStrType(
serialized_name="monthlyStorageServerVersion",
flags={"read_only": True},
)
properties.next_maintenance_run_id = AAZStrType(
serialized_name="nextMaintenanceRunId",
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.shape = AAZStrType(
flags={"required": True},
)
properties.storage_count = AAZIntType(
serialized_name="storageCount",
)
properties.storage_server_version = AAZStrType(
serialized_name="storageServerVersion",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.total_storage_size_in_gbs = AAZIntType(
serialized_name="totalStorageSizeInGbs",
flags={"read_only": True},
)
customer_contacts = cls._schema_on_200.value.Element.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
estimated_patching_time = cls._schema_on_200.value.Element.properties.estimated_patching_time
estimated_patching_time.estimated_db_server_patching_time = AAZIntType(
serialized_name="estimatedDbServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_network_switches_patching_time = AAZIntType(
serialized_name="estimatedNetworkSwitchesPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_storage_server_patching_time = AAZIntType(
serialized_name="estimatedStorageServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.total_estimated_patching_time = AAZIntType(
serialized_name="totalEstimatedPatchingTime",
flags={"read_only": True},
)
maintenance_window = cls._schema_on_200.value.Element.properties.maintenance_window
maintenance_window.custom_action_timeout_in_mins = AAZIntType(
serialized_name="customActionTimeoutInMins",
)
maintenance_window.days_of_week = AAZListType(
serialized_name="daysOfWeek",
)
maintenance_window.hours_of_day = AAZListType(
serialized_name="hoursOfDay",
)
maintenance_window.is_custom_action_timeout_enabled = AAZBoolType(
serialized_name="isCustomActionTimeoutEnabled",
)
maintenance_window.is_monthly_patching_enabled = AAZBoolType(
serialized_name="isMonthlyPatchingEnabled",
)
maintenance_window.lead_time_in_weeks = AAZIntType(
serialized_name="leadTimeInWeeks",
)
maintenance_window.months = AAZListType()
maintenance_window.patching_mode = AAZStrType(
serialized_name="patchingMode",
)
maintenance_window.preference = AAZStrType()
maintenance_window.weeks_of_month = AAZListType(
serialized_name="weeksOfMonth",
)
days_of_week = cls._schema_on_200.value.Element.properties.maintenance_window.days_of_week
days_of_week.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.maintenance_window.days_of_week.Element
_element.name = AAZStrType(
flags={"required": True},
)
hours_of_day = cls._schema_on_200.value.Element.properties.maintenance_window.hours_of_day
hours_of_day.Element = AAZIntType()
months = cls._schema_on_200.value.Element.properties.maintenance_window.months
months.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.maintenance_window.months.Element
_element.name = AAZStrType(
flags={"required": True},
)
weeks_of_month = cls._schema_on_200.value.Element.properties.maintenance_window.weeks_of_month
weeks_of_month.Element = AAZIntType()
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()
zones = cls._schema_on_200.value.Element.zones
zones.Element = AAZStrType()
return cls._schema_on_200
|
class CloudExadataInfrastructuresListBySubscription(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 | 34 | 2 | 32 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 325 | 30 | 295 | 39 | 278 | 0 | 121 | 32 | 111 | 2 | 1 | 1 | 11 |
8,540 |
Azure/azure-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/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._list.List.CloudExadataInfrastructuresListByResourceGroup
|
class CloudExadataInfrastructuresListByResourceGroup(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",
**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},
)
_element.zones = AAZListType(
flags={"required": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.activated_storage_count = AAZIntType(
serialized_name="activatedStorageCount",
flags={"read_only": True},
)
properties.additional_storage_count = AAZIntType(
serialized_name="additionalStorageCount",
flags={"read_only": True},
)
properties.available_storage_size_in_gbs = AAZIntType(
serialized_name="availableStorageSizeInGbs",
flags={"read_only": True},
)
properties.compute_count = AAZIntType(
serialized_name="computeCount",
)
properties.cpu_count = AAZIntType(
serialized_name="cpuCount",
flags={"read_only": True},
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
flags={"read_only": True},
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
flags={"read_only": True},
)
properties.db_server_version = AAZStrType(
serialized_name="dbServerVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.estimated_patching_time = AAZObjectType(
serialized_name="estimatedPatchingTime",
)
properties.last_maintenance_run_id = AAZStrType(
serialized_name="lastMaintenanceRunId",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.maintenance_window = AAZObjectType(
serialized_name="maintenanceWindow",
)
properties.max_cpu_count = AAZIntType(
serialized_name="maxCpuCount",
flags={"read_only": True},
)
properties.max_data_storage_in_tbs = AAZFloatType(
serialized_name="maxDataStorageInTbs",
flags={"read_only": True},
)
properties.max_db_node_storage_size_in_gbs = AAZIntType(
serialized_name="maxDbNodeStorageSizeInGbs",
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.monthly_db_server_version = AAZStrType(
serialized_name="monthlyDbServerVersion",
flags={"read_only": True},
)
properties.monthly_storage_server_version = AAZStrType(
serialized_name="monthlyStorageServerVersion",
flags={"read_only": True},
)
properties.next_maintenance_run_id = AAZStrType(
serialized_name="nextMaintenanceRunId",
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.shape = AAZStrType(
flags={"required": True},
)
properties.storage_count = AAZIntType(
serialized_name="storageCount",
)
properties.storage_server_version = AAZStrType(
serialized_name="storageServerVersion",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.total_storage_size_in_gbs = AAZIntType(
serialized_name="totalStorageSizeInGbs",
flags={"read_only": True},
)
customer_contacts = cls._schema_on_200.value.Element.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
estimated_patching_time = cls._schema_on_200.value.Element.properties.estimated_patching_time
estimated_patching_time.estimated_db_server_patching_time = AAZIntType(
serialized_name="estimatedDbServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_network_switches_patching_time = AAZIntType(
serialized_name="estimatedNetworkSwitchesPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_storage_server_patching_time = AAZIntType(
serialized_name="estimatedStorageServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.total_estimated_patching_time = AAZIntType(
serialized_name="totalEstimatedPatchingTime",
flags={"read_only": True},
)
maintenance_window = cls._schema_on_200.value.Element.properties.maintenance_window
maintenance_window.custom_action_timeout_in_mins = AAZIntType(
serialized_name="customActionTimeoutInMins",
)
maintenance_window.days_of_week = AAZListType(
serialized_name="daysOfWeek",
)
maintenance_window.hours_of_day = AAZListType(
serialized_name="hoursOfDay",
)
maintenance_window.is_custom_action_timeout_enabled = AAZBoolType(
serialized_name="isCustomActionTimeoutEnabled",
)
maintenance_window.is_monthly_patching_enabled = AAZBoolType(
serialized_name="isMonthlyPatchingEnabled",
)
maintenance_window.lead_time_in_weeks = AAZIntType(
serialized_name="leadTimeInWeeks",
)
maintenance_window.months = AAZListType()
maintenance_window.patching_mode = AAZStrType(
serialized_name="patchingMode",
)
maintenance_window.preference = AAZStrType()
maintenance_window.weeks_of_month = AAZListType(
serialized_name="weeksOfMonth",
)
days_of_week = cls._schema_on_200.value.Element.properties.maintenance_window.days_of_week
days_of_week.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.maintenance_window.days_of_week.Element
_element.name = AAZStrType(
flags={"required": True},
)
hours_of_day = cls._schema_on_200.value.Element.properties.maintenance_window.hours_of_day
hours_of_day.Element = AAZIntType()
months = cls._schema_on_200.value.Element.properties.maintenance_window.months
months.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.maintenance_window.months.Element
_element.name = AAZStrType(
flags={"required": True},
)
weeks_of_month = cls._schema_on_200.value.Element.properties.maintenance_window.weeks_of_month
weeks_of_month.Element = AAZIntType()
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()
zones = cls._schema_on_200.value.Element.zones
zones.Element = AAZStrType()
return cls._schema_on_200
|
class CloudExadataInfrastructuresListByResourceGroup(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 | 34 | 2 | 32 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 329 | 30 | 299 | 39 | 282 | 0 | 121 | 32 | 111 | 2 | 1 | 1 | 11 |
8,541 |
Azure/azure-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/_delete.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._delete.Delete.CloudExadataInfrastructuresDelete
|
class CloudExadataInfrastructuresDelete(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/cloudExadataInfrastructures/{cloudexadatainfrastructurename}",
**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(
"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
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class CloudExadataInfrastructuresDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_204(self, session):
pass
def on_200_201(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,542 |
Azure/azure-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/_create.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._create.Create.CloudExadataInfrastructuresCreateOrUpdate
|
class CloudExadataInfrastructuresCreateOrUpdate(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/cloudExadataInfrastructures/{cloudexadatainfrastructurename}",
**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(
"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(
"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")
_builder.set_prop("zones", AAZListType, ".zones",
typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"computeCount", AAZIntType, ".compute_count")
properties.set_prop("customerContacts",
AAZListType, ".customer_contacts")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("maintenanceWindow",
AAZObjectType, ".maintenance_window")
properties.set_prop("shape", AAZStrType, ".shape", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"storageCount", AAZIntType, ".storage_count")
customer_contacts = _builder.get(".properties.customerContacts")
if customer_contacts is not None:
customer_contacts.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.customerContacts[]")
if _elements is not None:
_elements.set_prop("email", AAZStrType, ".email", typ_kwargs={
"flags": {"required": True}})
maintenance_window = _builder.get(".properties.maintenanceWindow")
if maintenance_window is not None:
maintenance_window.set_prop(
"customActionTimeoutInMins", AAZIntType, ".custom_action_timeout_in_mins")
maintenance_window.set_prop(
"daysOfWeek", AAZListType, ".days_of_week")
maintenance_window.set_prop(
"hoursOfDay", AAZListType, ".hours_of_day")
maintenance_window.set_prop(
"isCustomActionTimeoutEnabled", AAZBoolType, ".is_custom_action_timeout_enabled")
maintenance_window.set_prop(
"isMonthlyPatchingEnabled", AAZBoolType, ".is_monthly_patching_enabled")
maintenance_window.set_prop(
"leadTimeInWeeks", AAZIntType, ".lead_time_in_weeks")
maintenance_window.set_prop("months", AAZListType, ".months")
maintenance_window.set_prop(
"patchingMode", AAZStrType, ".patching_mode")
maintenance_window.set_prop(
"preference", AAZStrType, ".preference")
maintenance_window.set_prop(
"weeksOfMonth", AAZListType, ".weeks_of_month")
days_of_week = _builder.get(
".properties.maintenanceWindow.daysOfWeek")
if days_of_week is not None:
days_of_week.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.maintenanceWindow.daysOfWeek[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
hours_of_day = _builder.get(
".properties.maintenanceWindow.hoursOfDay")
if hours_of_day is not None:
hours_of_day.set_elements(AAZIntType, ".")
months = _builder.get(".properties.maintenanceWindow.months")
if months is not None:
months.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.maintenanceWindow.months[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
weeks_of_month = _builder.get(
".properties.maintenanceWindow.weeksOfMonth")
if weeks_of_month is not None:
weeks_of_month.set_elements(AAZIntType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
zones = _builder.get(".zones")
if zones is not None:
zones.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},
)
_schema_on_200_201.zones = AAZListType(
flags={"required": True},
)
properties = cls._schema_on_200_201.properties
properties.activated_storage_count = AAZIntType(
serialized_name="activatedStorageCount",
flags={"read_only": True},
)
properties.additional_storage_count = AAZIntType(
serialized_name="additionalStorageCount",
flags={"read_only": True},
)
properties.available_storage_size_in_gbs = AAZIntType(
serialized_name="availableStorageSizeInGbs",
flags={"read_only": True},
)
properties.compute_count = AAZIntType(
serialized_name="computeCount",
)
properties.cpu_count = AAZIntType(
serialized_name="cpuCount",
flags={"read_only": True},
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
flags={"read_only": True},
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
flags={"read_only": True},
)
properties.db_server_version = AAZStrType(
serialized_name="dbServerVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.estimated_patching_time = AAZObjectType(
serialized_name="estimatedPatchingTime",
)
properties.last_maintenance_run_id = AAZStrType(
serialized_name="lastMaintenanceRunId",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.maintenance_window = AAZObjectType(
serialized_name="maintenanceWindow",
)
properties.max_cpu_count = AAZIntType(
serialized_name="maxCpuCount",
flags={"read_only": True},
)
properties.max_data_storage_in_tbs = AAZFloatType(
serialized_name="maxDataStorageInTbs",
flags={"read_only": True},
)
properties.max_db_node_storage_size_in_gbs = AAZIntType(
serialized_name="maxDbNodeStorageSizeInGbs",
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.monthly_db_server_version = AAZStrType(
serialized_name="monthlyDbServerVersion",
flags={"read_only": True},
)
properties.monthly_storage_server_version = AAZStrType(
serialized_name="monthlyStorageServerVersion",
flags={"read_only": True},
)
properties.next_maintenance_run_id = AAZStrType(
serialized_name="nextMaintenanceRunId",
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.shape = AAZStrType(
flags={"required": True},
)
properties.storage_count = AAZIntType(
serialized_name="storageCount",
)
properties.storage_server_version = AAZStrType(
serialized_name="storageServerVersion",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.total_storage_size_in_gbs = AAZIntType(
serialized_name="totalStorageSizeInGbs",
flags={"read_only": True},
)
customer_contacts = cls._schema_on_200_201.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
estimated_patching_time = cls._schema_on_200_201.properties.estimated_patching_time
estimated_patching_time.estimated_db_server_patching_time = AAZIntType(
serialized_name="estimatedDbServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_network_switches_patching_time = AAZIntType(
serialized_name="estimatedNetworkSwitchesPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_storage_server_patching_time = AAZIntType(
serialized_name="estimatedStorageServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.total_estimated_patching_time = AAZIntType(
serialized_name="totalEstimatedPatchingTime",
flags={"read_only": True},
)
maintenance_window = cls._schema_on_200_201.properties.maintenance_window
maintenance_window.custom_action_timeout_in_mins = AAZIntType(
serialized_name="customActionTimeoutInMins",
)
maintenance_window.days_of_week = AAZListType(
serialized_name="daysOfWeek",
)
maintenance_window.hours_of_day = AAZListType(
serialized_name="hoursOfDay",
)
maintenance_window.is_custom_action_timeout_enabled = AAZBoolType(
serialized_name="isCustomActionTimeoutEnabled",
)
maintenance_window.is_monthly_patching_enabled = AAZBoolType(
serialized_name="isMonthlyPatchingEnabled",
)
maintenance_window.lead_time_in_weeks = AAZIntType(
serialized_name="leadTimeInWeeks",
)
maintenance_window.months = AAZListType()
maintenance_window.patching_mode = AAZStrType(
serialized_name="patchingMode",
)
maintenance_window.preference = AAZStrType()
maintenance_window.weeks_of_month = AAZListType(
serialized_name="weeksOfMonth",
)
days_of_week = cls._schema_on_200_201.properties.maintenance_window.days_of_week
days_of_week.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.maintenance_window.days_of_week.Element
_element.name = AAZStrType(
flags={"required": True},
)
hours_of_day = cls._schema_on_200_201.properties.maintenance_window.hours_of_day
hours_of_day.Element = AAZIntType()
months = cls._schema_on_200_201.properties.maintenance_window.months
months.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.maintenance_window.months.Element
_element.name = AAZStrType(
flags={"required": True},
)
weeks_of_month = cls._schema_on_200_201.properties.maintenance_window.weeks_of_month
weeks_of_month.Element = AAZIntType()
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()
zones = cls._schema_on_200_201.zones
zones.Element = AAZStrType()
return cls._schema_on_200_201
|
class CloudExadataInfrastructuresCreateOrUpdate(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 | 40 | 3 | 36 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 417 | 42 | 375 | 52 | 356 | 0 | 175 | 43 | 164 | 13 | 1 | 1 | 25 |
8,543 |
Azure/azure-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/autonomous_database/version/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.version._list.List.AutonomousDatabaseVersionsListByLocation
|
class AutonomousDatabaseVersionsListByLocation(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/locations/{location}/autonomousDbVersions",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"location", self.ctx.args.location,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "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.db_workload = AAZStrType(
serialized_name="dbWorkload",
)
properties.is_default_for_free = AAZBoolType(
serialized_name="isDefaultForFree",
flags={"read_only": True},
)
properties.is_default_for_paid = AAZBoolType(
serialized_name="isDefaultForPaid",
flags={"read_only": True},
)
properties.is_free_tier_enabled = AAZBoolType(
serialized_name="isFreeTierEnabled",
flags={"read_only": True},
)
properties.is_paid_enabled = AAZBoolType(
serialized_name="isPaidEnabled",
flags={"read_only": True},
)
properties.version = AAZStrType(
flags={"required": True, "read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class AutonomousDatabaseVersionsListByLocation(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 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 150 | 18 | 132 | 30 | 115 | 0 | 57 | 23 | 47 | 2 | 1 | 1 | 11 |
8,544 |
Azure/azure-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/autonomous_database/national_character_set/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.national_character_set._list.List.AutonomousDatabaseNationalCharacterSetsListByLocation
|
class AutonomousDatabaseNationalCharacterSetsListByLocation(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/locations/{location}/autonomousDatabaseNationalCharacterSets",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"location", self.ctx.args.location,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "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.character_set = AAZStrType(
serialized_name="characterSet",
flags={"required": True, "read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class AutonomousDatabaseNationalCharacterSetsListByLocation(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 132 | 18 | 114 | 30 | 97 | 0 | 52 | 23 | 42 | 2 | 1 | 1 | 11 |
8,545 |
Azure/azure-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/autonomous_database/character_set/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.character_set._list.List.AutonomousDatabaseCharacterSetsListByLocation
|
class AutonomousDatabaseCharacterSetsListByLocation(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/locations/{location}/autonomousDatabaseCharacterSets",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"location", self.ctx.args.location,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "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.character_set = AAZStrType(
serialized_name="characterSet",
flags={"required": True, "read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class AutonomousDatabaseCharacterSetsListByLocation(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 132 | 18 | 114 | 30 | 97 | 0 | 52 | 23 | 42 | 2 | 1 | 1 | 11 |
8,546 |
Azure/azure-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/autonomous_database/backup/_wait.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._wait.Wait.AutonomousDatabaseBackupsGet
|
class AutonomousDatabaseBackupsGet(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}",
**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(
"adbbackupid", self.ctx.args.adbbackupid,
required=True,
),
**self.serialize_url_param(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.autonomous_database_ocid = AAZStrType(
serialized_name="autonomousDatabaseOcid",
)
properties.backup_type = AAZStrType(
serialized_name="backupType",
)
properties.database_size_in_tbs = AAZFloatType(
serialized_name="databaseSizeInTbs",
flags={"read_only": True},
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.is_automatic = AAZBoolType(
serialized_name="isAutomatic",
flags={"read_only": True},
)
properties.is_restorable = AAZBoolType(
serialized_name="isRestorable",
flags={"read_only": True},
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
properties.size_in_tbs = AAZFloatType(
serialized_name="sizeInTbs",
flags={"read_only": True},
)
properties.time_available_til = AAZStrType(
serialized_name="timeAvailableTil",
flags={"read_only": True},
)
properties.time_ended = AAZStrType(
serialized_name="timeEnded",
flags={"read_only": True},
)
properties.time_started = AAZStrType(
serialized_name="timeStarted",
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class AutonomousDatabaseBackupsGet(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 | 18 | 1 | 17 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 181 | 16 | 165 | 28 | 148 | 0 | 62 | 21 | 52 | 2 | 1 | 1 | 11 |
8,547 |
Azure/azure-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/autonomous_database/backup/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("retentionPeriodInDays",
AAZIntType, ".retention_period_in_days")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 8 | 1 | 7 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 18 | 4 | 14 | 5 | 11 | 0 | 10 | 5 | 7 | 2 | 1 | 1 | 3 |
8,548 |
Azure/azure-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/autonomous_database/backup/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._update.Update.AutonomousDatabaseBackupsGet
|
class AutonomousDatabaseBackupsGet(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}",
**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(
"adbbackupid", self.ctx.args.adbbackupid,
required=True,
),
**self.serialize_url_param(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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_autonomous_database_backup_read(
cls._schema_on_200)
return cls._schema_on_200
|
class AutonomousDatabaseBackupsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,549 |
Azure/azure-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/autonomous_database/backup/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._update.Update.AutonomousDatabaseBackupsCreateOrUpdate
|
class AutonomousDatabaseBackupsCreateOrUpdate(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}",
**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(
"adbbackupid", self.ctx.args.adbbackupid,
required=True,
),
**self.serialize_url_param(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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_autonomous_database_backup_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class AutonomousDatabaseBackupsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,550 |
Azure/azure-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/autonomous_database/backup/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._list.List.AutonomousDatabaseBackupsListByAutonomousDatabase
|
class AutonomousDatabaseBackupsListByAutonomousDatabase(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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_database_ocid = AAZStrType(
serialized_name="autonomousDatabaseOcid",
)
properties.backup_type = AAZStrType(
serialized_name="backupType",
)
properties.database_size_in_tbs = AAZFloatType(
serialized_name="databaseSizeInTbs",
flags={"read_only": True},
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.is_automatic = AAZBoolType(
serialized_name="isAutomatic",
flags={"read_only": True},
)
properties.is_restorable = AAZBoolType(
serialized_name="isRestorable",
flags={"read_only": True},
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
properties.size_in_tbs = AAZFloatType(
serialized_name="sizeInTbs",
flags={"read_only": True},
)
properties.time_available_til = AAZStrType(
serialized_name="timeAvailableTil",
flags={"read_only": True},
)
properties.time_ended = AAZStrType(
serialized_name="timeEnded",
flags={"read_only": True},
)
properties.time_started = AAZStrType(
serialized_name="timeStarted",
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class AutonomousDatabaseBackupsListByAutonomousDatabase(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 | 19 | 1 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 188 | 18 | 170 | 30 | 153 | 0 | 67 | 23 | 57 | 2 | 1 | 1 | 11 |
8,551 |
Azure/azure-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/autonomous_database/backup/_delete.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._delete.Delete.AutonomousDatabaseBackupsDelete
|
class AutonomousDatabaseBackupsDelete(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}",
**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(
"adbbackupid", self.ctx.args.adbbackupid,
required=True,
),
**self.serialize_url_param(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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 AutonomousDatabaseBackupsDelete(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 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,552 |
Azure/azure-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/autonomous_database/backup/_create.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database.backup._create.Create.AutonomousDatabaseBackupsCreateOrUpdate
|
class AutonomousDatabaseBackupsCreateOrUpdate(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/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}",
**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(
"adbbackupid", self.ctx.args.adbbackupid,
required=True,
),
**self.serialize_url_param(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("retentionPeriodInDays",
AAZIntType, ".retention_period_in_days")
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={"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.autonomous_database_ocid = AAZStrType(
serialized_name="autonomousDatabaseOcid",
)
properties.backup_type = AAZStrType(
serialized_name="backupType",
)
properties.database_size_in_tbs = AAZFloatType(
serialized_name="databaseSizeInTbs",
flags={"read_only": True},
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.is_automatic = AAZBoolType(
serialized_name="isAutomatic",
flags={"read_only": True},
)
properties.is_restorable = AAZBoolType(
serialized_name="isRestorable",
flags={"read_only": True},
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
properties.size_in_tbs = AAZFloatType(
serialized_name="sizeInTbs",
flags={"read_only": True},
)
properties.time_available_til = AAZStrType(
serialized_name="timeAvailableTil",
flags={"read_only": True},
)
properties.time_ended = AAZStrType(
serialized_name="timeEnded",
flags={"read_only": True},
)
properties.time_started = AAZStrType(
serialized_name="timeStarted",
flags={"read_only": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200_201
|
class AutonomousDatabaseBackupsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 19 | 1 | 19 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 216 | 19 | 197 | 33 | 178 | 0 | 72 | 24 | 61 | 3 | 1 | 1 | 14 |
8,553 |
Azure/azure-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/autonomous_database/_wait.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._wait.Wait.AutonomousDatabasesGet
|
class AutonomousDatabasesGet(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/autonomousDatabases/{autonomousdatabasename}",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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.actual_used_data_storage_size_in_tbs = AAZFloatType(
serialized_name="actualUsedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.allocated_storage_size_in_tbs = AAZFloatType(
serialized_name="allocatedStorageSizeInTbs",
flags={"read_only": True},
)
properties.apex_details = AAZObjectType(
serialized_name="apexDetails",
)
properties.autonomous_database_id = AAZStrType(
serialized_name="autonomousDatabaseId",
)
properties.autonomous_maintenance_schedule_type = AAZStrType(
serialized_name="autonomousMaintenanceScheduleType",
)
properties.available_upgrade_versions = AAZListType(
serialized_name="availableUpgradeVersions",
flags={"read_only": True},
)
properties.backup_retention_period_in_days = AAZIntType(
serialized_name="backupRetentionPeriodInDays",
)
properties.character_set = AAZStrType(
serialized_name="characterSet",
)
properties.compute_count = AAZFloatType(
serialized_name="computeCount",
)
properties.compute_model = AAZStrType(
serialized_name="computeModel",
)
properties.connection_strings = AAZObjectType(
serialized_name="connectionStrings",
)
properties.connection_urls = AAZObjectType(
serialized_name="connectionUrls",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_base_type = AAZStrType(
serialized_name="dataBaseType",
)
properties.data_safe_status = AAZStrType(
serialized_name="dataSafeStatus",
)
properties.data_storage_size_in_gbs = AAZIntType(
serialized_name="dataStorageSizeInGbs",
)
properties.data_storage_size_in_tbs = AAZIntType(
serialized_name="dataStorageSizeInTbs",
)
properties.database_edition = AAZStrType(
serialized_name="databaseEdition",
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
)
properties.db_workload = AAZStrType(
serialized_name="dbWorkload",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.failed_data_recovery_in_seconds = AAZIntType(
serialized_name="failedDataRecoveryInSeconds",
flags={"read_only": True},
)
properties.in_memory_area_in_gbs = AAZIntType(
serialized_name="inMemoryAreaInGbs",
flags={"read_only": True},
)
properties.is_auto_scaling_enabled = AAZBoolType(
serialized_name="isAutoScalingEnabled",
)
properties.is_auto_scaling_for_storage_enabled = AAZBoolType(
serialized_name="isAutoScalingForStorageEnabled",
)
properties.is_local_data_guard_enabled = AAZBoolType(
serialized_name="isLocalDataGuardEnabled",
)
properties.is_mtls_connection_required = AAZBoolType(
serialized_name="isMtlsConnectionRequired",
)
properties.is_preview = AAZBoolType(
serialized_name="isPreview",
flags={"read_only": True},
)
properties.is_remote_data_guard_enabled = AAZBoolType(
serialized_name="isRemoteDataGuardEnabled",
flags={"read_only": True},
)
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.local_adg_auto_failover_max_data_loss_limit = AAZIntType(
serialized_name="localAdgAutoFailoverMaxDataLossLimit",
)
properties.local_disaster_recovery_type = AAZStrType(
serialized_name="localDisasterRecoveryType",
)
properties.local_standby_db = AAZObjectType(
serialized_name="localStandbyDb",
)
properties.long_term_backup_schedule = AAZObjectType(
serialized_name="longTermBackupSchedule",
)
properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType(
serialized_name="memoryPerOracleComputeUnitInGbs",
flags={"read_only": True},
)
properties.ncharacter_set = AAZStrType(
serialized_name="ncharacterSet",
)
properties.next_long_term_backup_time_stamp = AAZStrType(
serialized_name="nextLongTermBackupTimeStamp",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.open_mode = AAZStrType(
serialized_name="openMode",
)
properties.operations_insights_status = AAZStrType(
serialized_name="operationsInsightsStatus",
)
properties.peer_db_ids = AAZListType(
serialized_name="peerDbIds",
flags={"read_only": True},
)
properties.permission_level = AAZStrType(
serialized_name="permissionLevel",
)
properties.private_endpoint = AAZStrType(
serialized_name="privateEndpoint",
flags={"read_only": True},
)
properties.private_endpoint_ip = AAZStrType(
serialized_name="privateEndpointIp",
)
properties.private_endpoint_label = AAZStrType(
serialized_name="privateEndpointLabel",
)
properties.provisionable_cpus = AAZListType(
serialized_name="provisionableCpus",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.role = AAZStrType()
properties.scheduled_operations = AAZObjectType(
serialized_name="scheduledOperations",
)
properties.service_console_url = AAZStrType(
serialized_name="serviceConsoleUrl",
flags={"read_only": True},
)
properties.sql_web_developer_url = AAZStrType(
serialized_name="sqlWebDeveloperUrl",
flags={"read_only": True},
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
)
properties.supported_regions_to_clone_to = AAZListType(
serialized_name="supportedRegionsToCloneTo",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
flags={"read_only": True},
)
properties.time_deletion_of_free_autonomous_database = AAZStrType(
serialized_name="timeDeletionOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.time_local_data_guard_enabled = AAZStrType(
serialized_name="timeLocalDataGuardEnabled",
flags={"read_only": True},
)
properties.time_maintenance_begin = AAZStrType(
serialized_name="timeMaintenanceBegin",
flags={"read_only": True},
)
properties.time_maintenance_end = AAZStrType(
serialized_name="timeMaintenanceEnd",
flags={"read_only": True},
)
properties.time_of_last_failover = AAZStrType(
serialized_name="timeOfLastFailover",
flags={"read_only": True},
)
properties.time_of_last_refresh = AAZStrType(
serialized_name="timeOfLastRefresh",
flags={"read_only": True},
)
properties.time_of_last_refresh_point = AAZStrType(
serialized_name="timeOfLastRefreshPoint",
flags={"read_only": True},
)
properties.time_of_last_switchover = AAZStrType(
serialized_name="timeOfLastSwitchover",
flags={"read_only": True},
)
properties.time_reclamation_of_free_autonomous_database = AAZStrType(
serialized_name="timeReclamationOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.used_data_storage_size_in_gbs = AAZIntType(
serialized_name="usedDataStorageSizeInGbs",
flags={"read_only": True},
)
properties.used_data_storage_size_in_tbs = AAZIntType(
serialized_name="usedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
)
properties.whitelisted_ips = AAZListType(
serialized_name="whitelistedIps",
)
apex_details = cls._schema_on_200.properties.apex_details
apex_details.apex_version = AAZStrType(
serialized_name="apexVersion",
)
apex_details.ords_version = AAZStrType(
serialized_name="ordsVersion",
)
available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions
available_upgrade_versions.Element = AAZStrType()
connection_strings = cls._schema_on_200.properties.connection_strings
connection_strings.all_connection_strings = AAZObjectType(
serialized_name="allConnectionStrings",
)
connection_strings.dedicated = AAZStrType()
connection_strings.high = AAZStrType()
connection_strings.low = AAZStrType()
connection_strings.medium = AAZStrType()
connection_strings.profiles = AAZListType()
all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings
all_connection_strings.high = AAZStrType()
all_connection_strings.low = AAZStrType()
all_connection_strings.medium = AAZStrType()
profiles = cls._schema_on_200.properties.connection_strings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.connection_strings.profiles.Element
_element.consumer_group = AAZStrType(
serialized_name="consumerGroup",
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.host_format = AAZStrType(
serialized_name="hostFormat",
flags={"required": True},
)
_element.is_regional = AAZBoolType(
serialized_name="isRegional",
)
_element.protocol = AAZStrType(
flags={"required": True},
)
_element.session_mode = AAZStrType(
serialized_name="sessionMode",
flags={"required": True},
)
_element.syntax_format = AAZStrType(
serialized_name="syntaxFormat",
flags={"required": True},
)
_element.tls_authentication = AAZStrType(
serialized_name="tlsAuthentication",
)
_element.value = AAZStrType(
flags={"required": True},
)
connection_urls = cls._schema_on_200.properties.connection_urls
connection_urls.apex_url = AAZStrType(
serialized_name="apexUrl",
)
connection_urls.database_transforms_url = AAZStrType(
serialized_name="databaseTransformsUrl",
)
connection_urls.graph_studio_url = AAZStrType(
serialized_name="graphStudioUrl",
)
connection_urls.machine_learning_notebook_url = AAZStrType(
serialized_name="machineLearningNotebookUrl",
)
connection_urls.mongo_db_url = AAZStrType(
serialized_name="mongoDbUrl",
)
connection_urls.ords_url = AAZStrType(
serialized_name="ordsUrl",
)
connection_urls.sql_dev_web_url = AAZStrType(
serialized_name="sqlDevWebUrl",
)
customer_contacts = cls._schema_on_200.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
local_standby_db = cls._schema_on_200.properties.local_standby_db
local_standby_db.lag_time_in_seconds = AAZIntType(
serialized_name="lagTimeInSeconds",
)
local_standby_db.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
local_standby_db.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
local_standby_db.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
)
local_standby_db.time_disaster_recovery_role_changed = AAZStrType(
serialized_name="timeDisasterRecoveryRoleChanged",
)
long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule
long_term_backup_schedule.is_disabled = AAZBoolType(
serialized_name="isDisabled",
)
long_term_backup_schedule.repeat_cadence = AAZStrType(
serialized_name="repeatCadence",
)
long_term_backup_schedule.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
long_term_backup_schedule.time_of_backup = AAZStrType(
serialized_name="timeOfBackup",
)
peer_db_ids = cls._schema_on_200.properties.peer_db_ids
peer_db_ids.Element = AAZStrType()
provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus
provisionable_cpus.Element = AAZIntType()
scheduled_operations = cls._schema_on_200.properties.scheduled_operations
scheduled_operations.day_of_week = AAZObjectType(
serialized_name="dayOfWeek",
flags={"required": True},
)
scheduled_operations.scheduled_start_time = AAZStrType(
serialized_name="scheduledStartTime",
)
scheduled_operations.scheduled_stop_time = AAZStrType(
serialized_name="scheduledStopTime",
)
day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week
day_of_week.name = AAZStrType(
flags={"required": True},
)
supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to
supported_regions_to_clone_to.Element = AAZStrType()
whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips
whitelisted_ips.Element = AAZStrType()
disc_clone = cls._schema_on_200.properties.discriminate_by(
"data_base_type", "Clone")
disc_clone.is_reconnect_clone_enabled = AAZBoolType(
serialized_name="isReconnectCloneEnabled",
flags={"read_only": True},
)
disc_clone.is_refreshable_clone = AAZBoolType(
serialized_name="isRefreshableClone",
flags={"read_only": True},
)
disc_clone.refreshable_status = AAZStrType(
serialized_name="refreshableStatus",
)
disc_clone.source_id = AAZStrType(
serialized_name="sourceId",
flags={"required": True},
)
disc_clone.time_until_reconnect_clone_enabled = AAZStrType(
serialized_name="timeUntilReconnectCloneEnabled",
)
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 AutonomousDatabasesGet(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 | 58 | 3 | 55 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 544 | 35 | 509 | 46 | 492 | 0 | 193 | 39 | 183 | 2 | 1 | 1 | 11 |
8,554 |
Azure/azure-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/autonomous_database/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("adminPassword", AAZStrType, ".admin_password", typ_kwargs={
"flags": {"secret": True}})
properties.set_prop("autonomousMaintenanceScheduleType",
AAZStrType, ".autonomous_maintenance_schedule_type")
properties.set_prop(
"backupRetentionPeriodInDays", AAZIntType, ".backup_retention_period_in_days")
properties.set_prop(
"computeCount", AAZFloatType, ".compute_count")
properties.set_prop(
"cpuCoreCount", AAZIntType, ".cpu_core_count")
properties.set_prop("customerContacts",
AAZListType, ".customer_contacts")
properties.set_prop("dataStorageSizeInGbs",
AAZIntType, ".data_storage_size_in_gbs")
properties.set_prop("dataStorageSizeInTbs",
AAZIntType, ".data_storage_size_in_tbs")
properties.set_prop("databaseEdition",
AAZStrType, ".database_edition")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("isAutoScalingEnabled",
AAZBoolType, ".is_auto_scaling_enabled")
properties.set_prop("isAutoScalingForStorageEnabled",
AAZBoolType, ".is_auto_scaling_for_storage_enabled")
properties.set_prop("isLocalDataGuardEnabled",
AAZBoolType, ".is_local_data_guard_enabled")
properties.set_prop("isMtlsConnectionRequired",
AAZBoolType, ".is_mtls_connection_required")
properties.set_prop(
"licenseModel", AAZStrType, ".license_model")
properties.set_prop("localAdgAutoFailoverMaxDataLossLimit",
AAZIntType, ".local_adg_auto_failover_max_data_loss_limit")
properties.set_prop("longTermBackupSchedule",
AAZObjectType, ".long_term_backup_schedule")
properties.set_prop("openMode", AAZStrType, ".open_mode")
properties.set_prop("peerDbId", AAZStrType, ".peer_db_id")
properties.set_prop("permissionLevel",
AAZStrType, ".permission_level")
properties.set_prop("role", AAZStrType, ".role")
properties.set_prop("scheduledOperations",
AAZObjectType, ".scheduled_operations")
properties.set_prop(
"whitelistedIps", AAZListType, ".whitelisted_ips")
properties.discriminate_by("dataBaseType", "Clone")
properties.discriminate_by("dataBaseType", "Regular")
customer_contacts = _builder.get(".properties.customerContacts")
if customer_contacts is not None:
customer_contacts.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.customerContacts[]")
if _elements is not None:
_elements.set_prop("email", AAZStrType, ".email", typ_kwargs={
"flags": {"required": True}})
long_term_backup_schedule = _builder.get(
".properties.longTermBackupSchedule")
if long_term_backup_schedule is not None:
long_term_backup_schedule.set_prop(
"isDisabled", AAZBoolType, ".is_disabled")
long_term_backup_schedule.set_prop(
"repeatCadence", AAZStrType, ".repeat_cadence")
long_term_backup_schedule.set_prop(
"retentionPeriodInDays", AAZIntType, ".retention_period_in_days")
long_term_backup_schedule.set_prop(
"timeOfBackup", AAZStrType, ".time_of_backup")
scheduled_operations = _builder.get(
".properties.scheduledOperations")
if scheduled_operations is not None:
scheduled_operations.set_prop("dayOfWeek", AAZObjectType, ".day_of_week", typ_kwargs={
"flags": {"required": True}})
scheduled_operations.set_prop(
"scheduledStartTime", AAZStrType, ".scheduled_start_time")
scheduled_operations.set_prop(
"scheduledStopTime", AAZStrType, ".scheduled_stop_time")
day_of_week = _builder.get(
".properties.scheduledOperations.dayOfWeek")
if day_of_week is not None:
day_of_week.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
whitelisted_ips = _builder.get(".properties.whitelistedIps")
if whitelisted_ips is not None:
whitelisted_ips.set_elements(AAZStrType, ".")
disc_clone = _builder.get(".properties{dataBaseType:Clone}")
if disc_clone is not None:
disc_clone.set_prop("timeUntilReconnectCloneEnabled",
AAZStrType, ".clone.time_until_reconnect_clone_enabled")
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 | 39 | 5 | 34 | 0 | 6 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 80 | 12 | 68 | 13 | 65 | 0 | 64 | 13 | 61 | 10 | 1 | 1 | 11 |
8,555 |
Azure/azure-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/autonomous_database/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._update.Update.AutonomousDatabasesGet
|
class AutonomousDatabasesGet(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/autonomousDatabases/{autonomousdatabasename}",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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_autonomous_database_read(
cls._schema_on_200)
return cls._schema_on_200
|
class AutonomousDatabasesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,556 |
Azure/azure-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/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._update.Update.CloudExadataInfrastructuresCreateOrUpdate
|
class CloudExadataInfrastructuresCreateOrUpdate(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/cloudExadataInfrastructures/{cloudexadatainfrastructurename}",
**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(
"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(
"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_exadata_infrastructure_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class CloudExadataInfrastructuresCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,557 |
Azure/azure-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/autonomous_database/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._update.Update.AutonomousDatabasesCreateOrUpdate
|
class AutonomousDatabasesCreateOrUpdate(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/autonomousDatabases/{autonomousdatabasename}",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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_autonomous_database_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class AutonomousDatabasesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,558 |
Azure/azure-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/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._update.Update.CloudExadataInfrastructuresGet
|
class CloudExadataInfrastructuresGet(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}",
**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()
_UpdateHelper._build_schema_cloud_exadata_infrastructure_read(
cls._schema_on_200)
return cls._schema_on_200
|
class CloudExadataInfrastructuresGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,559 |
Azure/azure-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/_wait.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._wait.Wait.CloudExadataInfrastructuresGet
|
class CloudExadataInfrastructuresGet(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}",
**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.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},
)
_schema_on_200.zones = AAZListType(
flags={"required": True},
)
properties = cls._schema_on_200.properties
properties.activated_storage_count = AAZIntType(
serialized_name="activatedStorageCount",
flags={"read_only": True},
)
properties.additional_storage_count = AAZIntType(
serialized_name="additionalStorageCount",
flags={"read_only": True},
)
properties.available_storage_size_in_gbs = AAZIntType(
serialized_name="availableStorageSizeInGbs",
flags={"read_only": True},
)
properties.compute_count = AAZIntType(
serialized_name="computeCount",
)
properties.cpu_count = AAZIntType(
serialized_name="cpuCount",
flags={"read_only": True},
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_storage_size_in_tbs = AAZFloatType(
serialized_name="dataStorageSizeInTbs",
flags={"read_only": True},
)
properties.db_node_storage_size_in_gbs = AAZIntType(
serialized_name="dbNodeStorageSizeInGbs",
flags={"read_only": True},
)
properties.db_server_version = AAZStrType(
serialized_name="dbServerVersion",
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.estimated_patching_time = AAZObjectType(
serialized_name="estimatedPatchingTime",
)
properties.last_maintenance_run_id = AAZStrType(
serialized_name="lastMaintenanceRunId",
)
properties.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
flags={"read_only": True},
)
properties.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
properties.maintenance_window = AAZObjectType(
serialized_name="maintenanceWindow",
)
properties.max_cpu_count = AAZIntType(
serialized_name="maxCpuCount",
flags={"read_only": True},
)
properties.max_data_storage_in_tbs = AAZFloatType(
serialized_name="maxDataStorageInTbs",
flags={"read_only": True},
)
properties.max_db_node_storage_size_in_gbs = AAZIntType(
serialized_name="maxDbNodeStorageSizeInGbs",
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.monthly_db_server_version = AAZStrType(
serialized_name="monthlyDbServerVersion",
flags={"read_only": True},
)
properties.monthly_storage_server_version = AAZStrType(
serialized_name="monthlyStorageServerVersion",
flags={"read_only": True},
)
properties.next_maintenance_run_id = AAZStrType(
serialized_name="nextMaintenanceRunId",
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.shape = AAZStrType(
flags={"required": True},
)
properties.storage_count = AAZIntType(
serialized_name="storageCount",
)
properties.storage_server_version = AAZStrType(
serialized_name="storageServerVersion",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.total_storage_size_in_gbs = AAZIntType(
serialized_name="totalStorageSizeInGbs",
flags={"read_only": True},
)
customer_contacts = cls._schema_on_200.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time
estimated_patching_time.estimated_db_server_patching_time = AAZIntType(
serialized_name="estimatedDbServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_network_switches_patching_time = AAZIntType(
serialized_name="estimatedNetworkSwitchesPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.estimated_storage_server_patching_time = AAZIntType(
serialized_name="estimatedStorageServerPatchingTime",
flags={"read_only": True},
)
estimated_patching_time.total_estimated_patching_time = AAZIntType(
serialized_name="totalEstimatedPatchingTime",
flags={"read_only": True},
)
maintenance_window = cls._schema_on_200.properties.maintenance_window
maintenance_window.custom_action_timeout_in_mins = AAZIntType(
serialized_name="customActionTimeoutInMins",
)
maintenance_window.days_of_week = AAZListType(
serialized_name="daysOfWeek",
)
maintenance_window.hours_of_day = AAZListType(
serialized_name="hoursOfDay",
)
maintenance_window.is_custom_action_timeout_enabled = AAZBoolType(
serialized_name="isCustomActionTimeoutEnabled",
)
maintenance_window.is_monthly_patching_enabled = AAZBoolType(
serialized_name="isMonthlyPatchingEnabled",
)
maintenance_window.lead_time_in_weeks = AAZIntType(
serialized_name="leadTimeInWeeks",
)
maintenance_window.months = AAZListType()
maintenance_window.patching_mode = AAZStrType(
serialized_name="patchingMode",
)
maintenance_window.preference = AAZStrType()
maintenance_window.weeks_of_month = AAZListType(
serialized_name="weeksOfMonth",
)
days_of_week = cls._schema_on_200.properties.maintenance_window.days_of_week
days_of_week.Element = AAZObjectType()
_element = cls._schema_on_200.properties.maintenance_window.days_of_week.Element
_element.name = AAZStrType(
flags={"required": True},
)
hours_of_day = cls._schema_on_200.properties.maintenance_window.hours_of_day
hours_of_day.Element = AAZIntType()
months = cls._schema_on_200.properties.maintenance_window.months
months.Element = AAZObjectType()
_element = cls._schema_on_200.properties.maintenance_window.months.Element
_element.name = AAZStrType(
flags={"required": True},
)
weeks_of_month = cls._schema_on_200.properties.maintenance_window.weeks_of_month
weeks_of_month.Element = AAZIntType()
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()
zones = cls._schema_on_200.zones
zones.Element = AAZStrType()
return cls._schema_on_200
|
class CloudExadataInfrastructuresGet(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 | 34 | 2 | 32 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 322 | 28 | 294 | 38 | 277 | 0 | 116 | 31 | 106 | 2 | 1 | 1 | 11 |
8,560 |
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.BuilderResourceCollection
|
class BuilderResourceCollection(_serialization.Model):
"""Object that includes an array of Builder resources and a possible link for next set.
:ivar value: Collection of Builder resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[BuilderResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.BuilderResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: Collection of Builder resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BuilderResourceCollection(_serialization.Model):
'''Object that includes an array of Builder resources and a possible link for next set.
:ivar value: Collection of Builder resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.BuilderResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: Collection of Builder resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 13 | 0 | 6 | 7 | 1 | 1.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 28 | 3 | 11 | 7 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,561 |
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.BuilderResource
|
class BuilderResource(ProxyResource):
"""KPack Builder 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: Property of the Builder resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderProperties
"""
_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": "BuilderProperties"},
}
def __init__(self, *, properties: Optional["_models.BuilderProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Property of the Builder resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class BuilderResource(ProxyResource):
'''KPack Builder 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: Property of the Builder resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderProperties
'''
def __init__(self, *, properties: Optional["_models.BuilderProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Property of the Builder resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderProperties
'''
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 |
8,562 |
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.BuilderProperties
|
class BuilderProperties(_serialization.Model):
"""KPack Builder properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Builder provision status. Known values are: "Creating", "Updating",
"Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuilderProvisioningState
:ivar stack: Builder cluster stack property.
:vartype stack: ~azure.mgmt.appplatform.v2023_12_01.models.StackProperties
:ivar buildpack_groups: Builder buildpack groups.
:vartype buildpack_groups:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildpacksGroupProperties]
"""
_validation = {
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"stack": {"key": "stack", "type": "StackProperties"},
"buildpack_groups": {"key": "buildpackGroups", "type": "[BuildpacksGroupProperties]"},
}
def __init__(
self,
*,
stack: Optional["_models.StackProperties"] = None,
buildpack_groups: Optional[List["_models.BuildpacksGroupProperties"]] = None,
**kwargs: Any
) -> None:
"""
:keyword stack: Builder cluster stack property.
:paramtype stack: ~azure.mgmt.appplatform.v2023_12_01.models.StackProperties
:keyword buildpack_groups: Builder buildpack groups.
:paramtype buildpack_groups:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildpacksGroupProperties]
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.stack = stack
self.buildpack_groups = buildpack_groups
|
class BuilderProperties(_serialization.Model):
'''KPack Builder properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Builder provision status. Known values are: "Creating", "Updating",
"Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuilderProvisioningState
:ivar stack: Builder cluster stack property.
:vartype stack: ~azure.mgmt.appplatform.v2023_12_01.models.StackProperties
:ivar buildpack_groups: Builder buildpack groups.
:vartype buildpack_groups:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildpacksGroupProperties]
'''
def __init__(
self,
*,
stack: Optional["_models.StackProperties"] = None,
buildpack_groups: Optional[List["_models.BuildpacksGroupProperties"]] = None,
**kwargs: Any
) -> None:
'''
:keyword stack: Builder cluster stack property.
:paramtype stack: ~azure.mgmt.appplatform.v2023_12_01.models.StackProperties
:keyword buildpack_groups: Builder buildpack groups.
:paramtype buildpack_groups:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildpacksGroupProperties]
'''
pass
| 2 | 2 | 18 | 0 | 11 | 7 | 1 | 0.95 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 16 | 44 | 5 | 20 | 13 | 12 | 19 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
8,563 |
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.BuildStageProperties
|
class BuildStageProperties(_serialization.Model):
"""The build stage (init-container and container) resources in build pod.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The name of this build stage resource.
:vartype name: str
:ivar status: The provisioning state of this build stage resource. Known values are:
"NotStarted", "Running", "Succeeded", and "Failed".
:vartype status: str or
~azure.mgmt.appplatform.v2023_12_01.models.KPackBuildStageProvisioningState
:ivar exit_code: The exit code of this build init container.
:vartype exit_code: str
:ivar reason: The reason of this build init container.
:vartype reason: str
"""
_validation = {
"name": {"readonly": True},
"status": {"readonly": True},
"exit_code": {"readonly": True},
"reason": {"readonly": True},
}
_attribute_map = {
"name": {"key": "name", "type": "str"},
"status": {"key": "status", "type": "str"},
"exit_code": {"key": "exitCode", "type": "str"},
"reason": {"key": "reason", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.name = None
self.status = None
self.exit_code = None
self.reason = None
|
class BuildStageProperties(_serialization.Model):
'''The build stage (init-container and container) resources in build pod.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The name of this build stage resource.
:vartype name: str
:ivar status: The provisioning state of this build stage resource. Known values are:
"NotStarted", "Running", "Succeeded", and "Failed".
:vartype status: str or
~azure.mgmt.appplatform.v2023_12_01.models.KPackBuildStageProvisioningState
:ivar exit_code: The exit code of this build init container.
:vartype exit_code: str
:ivar reason: The reason of this build init container.
:vartype reason: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 7 | 0 | 6 | 1 | 1 | 0.74 | 1 | 2 | 0 | 0 | 1 | 4 | 1 | 16 | 38 | 5 | 19 | 8 | 17 | 14 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
8,564 |
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.BuildServiceProperties
|
class BuildServiceProperties(_serialization.Model):
"""Build service resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar container_registry: The resource id of the container registry used in this build service.
:vartype container_registry: str
:ivar k_pack_version: The installed KPack version in this build service.
:vartype k_pack_version: str
:ivar provisioning_state: Provisioning state of the KPack build service. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProvisioningState
:ivar resource_requests: The runtime resource configuration of this build service.
:vartype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServicePropertiesResourceRequests
"""
_validation = {
"k_pack_version": {"readonly": True},
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"container_registry": {"key": "containerRegistry", "type": "str"},
"k_pack_version": {"key": "kPackVersion", "type": "str"},
"provisioning_state": {"key": "provisioningState", "type": "str"},
"resource_requests": {"key": "resourceRequests", "type": "BuildServicePropertiesResourceRequests"},
}
def __init__(
self,
*,
container_registry: Optional[str] = None,
resource_requests: Optional["_models.BuildServicePropertiesResourceRequests"] = None,
**kwargs: Any
) -> None:
"""
:keyword container_registry: The resource id of the container registry used in this build
service.
:paramtype container_registry: str
:keyword resource_requests: The runtime resource configuration of this build service.
:paramtype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServicePropertiesResourceRequests
"""
super().__init__(**kwargs)
self.container_registry = container_registry
self.k_pack_version = None
self.provisioning_state = None
self.resource_requests = resource_requests
|
class BuildServiceProperties(_serialization.Model):
'''Build service resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar container_registry: The resource id of the container registry used in this build service.
:vartype container_registry: str
:ivar k_pack_version: The installed KPack version in this build service.
:vartype k_pack_version: str
:ivar provisioning_state: Provisioning state of the KPack build service. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProvisioningState
:ivar resource_requests: The runtime resource configuration of this build service.
:vartype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServicePropertiesResourceRequests
'''
def __init__(
self,
*,
container_registry: Optional[str] = None,
resource_requests: Optional["_models.BuildServicePropertiesResourceRequests"] = None,
**kwargs: Any
) -> None:
'''
:keyword container_registry: The resource id of the container registry used in this build
service.
:paramtype container_registry: str
:keyword resource_requests: The runtime resource configuration of this build service.
:paramtype resource_requests:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServicePropertiesResourceRequests
'''
pass
| 2 | 2 | 20 | 0 | 12 | 8 | 1 | 0.96 | 1 | 3 | 0 | 0 | 1 | 4 | 1 | 16 | 50 | 5 | 23 | 14 | 15 | 22 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
8,565 |
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.BuildServiceCollection
|
class BuildServiceCollection(_serialization.Model):
"""Object that includes an array of Build service resources and a possible link for next set.
:ivar value: Collection of Build service resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildService]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[BuildService]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.BuildService"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: Collection of Build service resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildService]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BuildServiceCollection(_serialization.Model):
'''Object that includes an array of Build service resources and a possible link for next set.
:ivar value: Collection of Build service resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildService]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.BuildService"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: Collection of Build service resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildService]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 13 | 0 | 6 | 7 | 1 | 1.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 28 | 3 | 11 | 7 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,566 |
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.BuildServiceAgentPoolResourceCollection
|
class BuildServiceAgentPoolResourceCollection(_serialization.Model):
"""Object that includes an array of build service agent pool resources and a possible link for
next set.
:ivar value: Collection of build service agent pool resource.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[BuildServiceAgentPoolResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self,
*,
value: Optional[List["_models.BuildServiceAgentPoolResource"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword value: Collection of build service agent pool resource.
:paramtype value:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BuildServiceAgentPoolResourceCollection(_serialization.Model):
'''Object that includes an array of build service agent pool resources and a possible link for
next set.
:ivar value: Collection of build service agent pool resource.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self,
*,
value: Optional[List["_models.BuildServiceAgentPoolResource"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword value: Collection of build service agent pool resource.
:paramtype value:
list[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 18 | 0 | 10 | 8 | 1 | 1.07 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 34 | 3 | 15 | 11 | 7 | 16 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,567 |
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.BuildServiceAgentPoolResource
|
class BuildServiceAgentPoolResource(ProxyResource):
"""The build service agent pool 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: build service agent pool properties.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolProperties
"""
_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": "BuildServiceAgentPoolProperties"},
}
def __init__(
self, *, properties: Optional["_models.BuildServiceAgentPoolProperties"] = None, **kwargs: Any
) -> None:
"""
:keyword properties: build service agent pool properties.
:paramtype properties:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class BuildServiceAgentPoolResource(ProxyResource):
'''The build service agent pool 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: build service agent pool properties.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolProperties
'''
def __init__(
self, *, properties: Optional["_models.BuildServiceAgentPoolProperties"] = None, **kwargs: Any
) -> None:
'''
:keyword properties: build service agent pool properties.
:paramtype properties:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolProperties
'''
pass
| 2 | 2 | 10 | 0 | 5 | 5 | 1 | 0.95 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 42 | 5 | 19 | 7 | 15 | 18 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
8,568 |
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.BuildServiceAgentPoolProperties
|
class BuildServiceAgentPoolProperties(_serialization.Model):
"""Build service agent pool properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of the build service agent pool.
:vartype provisioning_state: str
:ivar pool_size: build service agent pool size properties.
:vartype pool_size:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolSizeProperties
"""
_validation = {
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"pool_size": {"key": "poolSize", "type": "BuildServiceAgentPoolSizeProperties"},
}
def __init__(
self, *, pool_size: Optional["_models.BuildServiceAgentPoolSizeProperties"] = None, **kwargs: Any
) -> None:
"""
:keyword pool_size: build service agent pool size properties.
:paramtype pool_size:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolSizeProperties
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.pool_size = pool_size
|
class BuildServiceAgentPoolProperties(_serialization.Model):
'''Build service agent pool properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of the build service agent pool.
:vartype provisioning_state: str
:ivar pool_size: build service agent pool size properties.
:vartype pool_size:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolSizeProperties
'''
def __init__(
self, *, pool_size: Optional["_models.BuildServiceAgentPoolSizeProperties"] = None, **kwargs: Any
) -> None:
'''
:keyword pool_size: build service agent pool size properties.
:paramtype pool_size:
~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolSizeProperties
'''
pass
| 2 | 2 | 11 | 0 | 6 | 5 | 1 | 0.93 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 16 | 32 | 5 | 14 | 8 | 10 | 13 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
8,569 |
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.BuildService
|
class BuildService(ProxyResource):
"""Build service 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 build resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProperties
"""
_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": "BuildServiceProperties"},
}
def __init__(self, *, properties: Optional["_models.BuildServiceProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the build resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class BuildService(ProxyResource):
'''Build service 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 build resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProperties
'''
def __init__(self, *, properties: Optional["_models.BuildServiceProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the build resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceProperties
'''
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 |
8,570 |
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.BuildResultProperties
|
class BuildResultProperties(_serialization.Model):
"""Build result resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The name of this build result.
:vartype name: str
:ivar provisioning_state: Provisioning state of the KPack build result. Known values are:
"Queuing", "Building", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProvisioningState
:ivar error: Error when build is failed.
:vartype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:ivar build_pod_name: The build pod name which can be used to get the build log streaming.
:vartype build_pod_name: str
:ivar build_stages: All of the build stage (init-container and container) resources in build
pod.
:vartype build_stages: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildStageProperties]
:ivar image: The container registry image of this build result.
:vartype image: str
"""
_validation = {
"provisioning_state": {"readonly": True},
"build_stages": {"readonly": True},
"image": {"readonly": True},
}
_attribute_map = {
"name": {"key": "name", "type": "str"},
"provisioning_state": {"key": "provisioningState", "type": "str"},
"error": {"key": "error", "type": "Error"},
"build_pod_name": {"key": "buildPodName", "type": "str"},
"build_stages": {"key": "buildStages", "type": "[BuildStageProperties]"},
"image": {"key": "image", "type": "str"},
}
def __init__(
self,
*,
name: Optional[str] = None,
error: Optional["_models.Error"] = None,
build_pod_name: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword name: The name of this build result.
:paramtype name: str
:keyword error: Error when build is failed.
:paramtype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:keyword build_pod_name: The build pod name which can be used to get the build log streaming.
:paramtype build_pod_name: str
"""
super().__init__(**kwargs)
self.name = name
self.provisioning_state = None
self.error = error
self.build_pod_name = build_pod_name
self.build_stages = None
self.image = None
|
class BuildResultProperties(_serialization.Model):
'''Build result resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The name of this build result.
:vartype name: str
:ivar provisioning_state: Provisioning state of the KPack build result. Known values are:
"Queuing", "Building", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProvisioningState
:ivar error: Error when build is failed.
:vartype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:ivar build_pod_name: The build pod name which can be used to get the build log streaming.
:vartype build_pod_name: str
:ivar build_stages: All of the build stage (init-container and container) resources in build
pod.
:vartype build_stages: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildStageProperties]
:ivar image: The container registry image of this build result.
:vartype image: str
'''
def __init__(
self,
*,
name: Optional[str] = None,
error: Optional["_models.Error"] = None,
build_pod_name: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword name: The name of this build result.
:paramtype name: str
:keyword error: Error when build is failed.
:paramtype error: ~azure.mgmt.appplatform.v2023_12_01.models.Error
:keyword build_pod_name: The build pod name which can be used to get the build log streaming.
:paramtype build_pod_name: str
'''
pass
| 2 | 2 | 23 | 0 | 15 | 8 | 1 | 0.9 | 1 | 3 | 0 | 0 | 1 | 6 | 1 | 16 | 60 | 5 | 29 | 17 | 20 | 26 | 11 | 10 | 9 | 1 | 2 | 0 | 1 |
8,571 |
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.BuildResultCollection
|
class BuildResultCollection(_serialization.Model):
"""Object that includes an array of Build result resources and a possible link for next set.
:ivar value: Collection of Build result resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[BuildResult]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.BuildResult"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: Collection of Build result resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BuildResultCollection(_serialization.Model):
'''Object that includes an array of Build result resources and a possible link for next set.
:ivar value: Collection of Build result resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.BuildResult"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: Collection of Build result resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 13 | 0 | 6 | 7 | 1 | 1.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 28 | 3 | 11 | 7 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,572 |
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.BuildResult
|
class BuildResult(ProxyResource):
"""Build result 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 build result resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProperties
"""
_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": "BuildResultProperties"},
}
def __init__(self, *, properties: Optional["_models.BuildResultProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the build result resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class BuildResult(ProxyResource):
'''Build result 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 build result resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProperties
'''
def __init__(self, *, properties: Optional["_models.BuildResultProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the build result resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultProperties
'''
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 |
8,573 |
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.BuildProperties
|
class BuildProperties(_serialization.Model):
"""Build resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar relative_path: The relative path of source code.
:vartype relative_path: str
:ivar builder: The resource id of builder to build the source code.
:vartype builder: str
:ivar agent_pool: The resource id of agent pool.
:vartype agent_pool: str
:ivar provisioning_state: Provisioning state of the KPack build result. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildProvisioningState
:ivar env: The environment variables for this build.
:vartype env: dict[str, str]
:ivar apms: The APMs for this build.
:vartype apms: list[~azure.mgmt.appplatform.v2023_12_01.models.ApmReference]
:ivar certificates: The CA Certificates for this build.
:vartype certificates: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateReference]
:ivar triggered_build_result: The build result triggered by this build.
:vartype triggered_build_result:
~azure.mgmt.appplatform.v2023_12_01.models.TriggeredBuildResult
:ivar resource_requests: The customized build resource for this build.
:vartype resource_requests: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResourceRequests
"""
_validation = {
"provisioning_state": {"readonly": True},
"triggered_build_result": {"readonly": True},
}
_attribute_map = {
"relative_path": {"key": "relativePath", "type": "str"},
"builder": {"key": "builder", "type": "str"},
"agent_pool": {"key": "agentPool", "type": "str"},
"provisioning_state": {"key": "provisioningState", "type": "str"},
"env": {"key": "env", "type": "{str}"},
"apms": {"key": "apms", "type": "[ApmReference]"},
"certificates": {"key": "certificates", "type": "[CertificateReference]"},
"triggered_build_result": {"key": "triggeredBuildResult", "type": "TriggeredBuildResult"},
"resource_requests": {"key": "resourceRequests", "type": "BuildResourceRequests"},
}
def __init__(
self,
*,
relative_path: Optional[str] = None,
builder: Optional[str] = None,
agent_pool: Optional[str] = None,
env: Optional[Dict[str, str]] = None,
apms: Optional[List["_models.ApmReference"]] = None,
certificates: Optional[List["_models.CertificateReference"]] = None,
resource_requests: Optional["_models.BuildResourceRequests"] = None,
**kwargs: Any
) -> None:
"""
:keyword relative_path: The relative path of source code.
:paramtype relative_path: str
:keyword builder: The resource id of builder to build the source code.
:paramtype builder: str
:keyword agent_pool: The resource id of agent pool.
:paramtype agent_pool: str
:keyword env: The environment variables for this build.
:paramtype env: dict[str, str]
:keyword apms: The APMs for this build.
:paramtype apms: list[~azure.mgmt.appplatform.v2023_12_01.models.ApmReference]
:keyword certificates: The CA Certificates for this build.
:paramtype certificates: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateReference]
:keyword resource_requests: The customized build resource for this build.
:paramtype resource_requests: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResourceRequests
"""
super().__init__(**kwargs)
self.relative_path = relative_path
self.builder = builder
self.agent_pool = agent_pool
self.provisioning_state = None
self.env = env
self.apms = apms
self.certificates = certificates
self.triggered_build_result = None
self.resource_requests = resource_requests
|
class BuildProperties(_serialization.Model):
'''Build resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar relative_path: The relative path of source code.
:vartype relative_path: str
:ivar builder: The resource id of builder to build the source code.
:vartype builder: str
:ivar agent_pool: The resource id of agent pool.
:vartype agent_pool: str
:ivar provisioning_state: Provisioning state of the KPack build result. Known values are:
"Creating", "Updating", "Succeeded", "Failed", and "Deleting".
:vartype provisioning_state: str or
~azure.mgmt.appplatform.v2023_12_01.models.BuildProvisioningState
:ivar env: The environment variables for this build.
:vartype env: dict[str, str]
:ivar apms: The APMs for this build.
:vartype apms: list[~azure.mgmt.appplatform.v2023_12_01.models.ApmReference]
:ivar certificates: The CA Certificates for this build.
:vartype certificates: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateReference]
:ivar triggered_build_result: The build result triggered by this build.
:vartype triggered_build_result:
~azure.mgmt.appplatform.v2023_12_01.models.TriggeredBuildResult
:ivar resource_requests: The customized build resource for this build.
:vartype resource_requests: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResourceRequests
'''
def __init__(
self,
*,
relative_path: Optional[str] = None,
builder: Optional[str] = None,
agent_pool: Optional[str] = None,
env: Optional[Dict[str, str]] = None,
apms: Optional[List["_models.ApmReference"]] = None,
certificates: Optional[List["_models.CertificateReference"]] = None,
resource_requests: Optional["_models.BuildResourceRequests"] = None,
**kwargs: Any
) -> None:
'''
:keyword relative_path: The relative path of source code.
:paramtype relative_path: str
:keyword builder: The resource id of builder to build the source code.
:paramtype builder: str
:keyword agent_pool: The resource id of agent pool.
:paramtype agent_pool: str
:keyword env: The environment variables for this build.
:paramtype env: dict[str, str]
:keyword apms: The APMs for this build.
:paramtype apms: list[~azure.mgmt.appplatform.v2023_12_01.models.ApmReference]
:keyword certificates: The CA Certificates for this build.
:paramtype certificates: list[~azure.mgmt.appplatform.v2023_12_01.models.CertificateReference]
:keyword resource_requests: The customized build resource for this build.
:paramtype resource_requests: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResourceRequests
'''
pass
| 2 | 2 | 38 | 0 | 22 | 16 | 1 | 1.05 | 1 | 3 | 0 | 0 | 1 | 9 | 1 | 16 | 83 | 5 | 38 | 24 | 25 | 40 | 14 | 13 | 12 | 1 | 2 | 0 | 1 |
8,574 |
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.BuildCollection
|
class BuildCollection(_serialization.Model):
"""Object that includes an array of Build resources and a possible link for next set.
:ivar value: Collection of Build resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.Build]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[Build]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.Build"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: Collection of Build resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.Build]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BuildCollection(_serialization.Model):
'''Object that includes an array of Build resources and a possible link for next set.
:ivar value: Collection of Build resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.Build]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.Build"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: Collection of Build resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.Build]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 13 | 0 | 6 | 7 | 1 | 1.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 28 | 3 | 11 | 7 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,575 |
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.Build
|
class Build(ProxyResource):
"""Build 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 build resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildProperties
"""
_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": "BuildProperties"},
}
def __init__(self, *, properties: Optional["_models.BuildProperties"] = None, **kwargs: Any) -> None:
"""
:keyword properties: Properties of the build resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class Build(ProxyResource):
'''Build 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 build resource.
:vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildProperties
'''
def __init__(self, *, properties: Optional["_models.BuildProperties"] = None, **kwargs: Any) -> None:
'''
:keyword properties: Properties of the build resource.
:paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.BuildProperties
'''
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 |
8,576 |
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.BindingResourceCollection
|
class BindingResourceCollection(_serialization.Model):
"""Object that includes an array of Binding resources and a possible link for next set.
:ivar value: Collection of Binding resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[BindingResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.BindingResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: Collection of Binding resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class BindingResourceCollection(_serialization.Model):
'''Object that includes an array of Binding resources and a possible link for next set.
:ivar value: Collection of Binding resources.
:vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource]
:ivar next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.BindingResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: Collection of Binding resources.
:paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource]
:keyword next_link: URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.
:paramtype next_link: str
'''
pass
| 2 | 2 | 13 | 0 | 6 | 7 | 1 | 1.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 28 | 3 | 11 | 7 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
8,577 |
Azure/azure-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/_update.py
|
azext_oracle_database.aaz.latest.oracle_database.cloud_exadata_infrastructure._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")
_builder.set_prop("zones", AAZListType, ".zones",
typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"computeCount", AAZIntType, ".compute_count")
properties.set_prop("customerContacts",
AAZListType, ".customer_contacts")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("maintenanceWindow",
AAZObjectType, ".maintenance_window")
properties.set_prop(
"storageCount", AAZIntType, ".storage_count")
customer_contacts = _builder.get(".properties.customerContacts")
if customer_contacts is not None:
customer_contacts.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.customerContacts[]")
if _elements is not None:
_elements.set_prop("email", AAZStrType, ".email", typ_kwargs={
"flags": {"required": True}})
maintenance_window = _builder.get(".properties.maintenanceWindow")
if maintenance_window is not None:
maintenance_window.set_prop(
"customActionTimeoutInMins", AAZIntType, ".custom_action_timeout_in_mins")
maintenance_window.set_prop(
"daysOfWeek", AAZListType, ".days_of_week")
maintenance_window.set_prop(
"hoursOfDay", AAZListType, ".hours_of_day")
maintenance_window.set_prop(
"isCustomActionTimeoutEnabled", AAZBoolType, ".is_custom_action_timeout_enabled")
maintenance_window.set_prop(
"isMonthlyPatchingEnabled", AAZBoolType, ".is_monthly_patching_enabled")
maintenance_window.set_prop(
"leadTimeInWeeks", AAZIntType, ".lead_time_in_weeks")
maintenance_window.set_prop("months", AAZListType, ".months")
maintenance_window.set_prop(
"patchingMode", AAZStrType, ".patching_mode")
maintenance_window.set_prop(
"preference", AAZStrType, ".preference")
maintenance_window.set_prop(
"weeksOfMonth", AAZListType, ".weeks_of_month")
days_of_week = _builder.get(
".properties.maintenanceWindow.daysOfWeek")
if days_of_week is not None:
days_of_week.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.maintenanceWindow.daysOfWeek[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
hours_of_day = _builder.get(
".properties.maintenanceWindow.hoursOfDay")
if hours_of_day is not None:
hours_of_day.set_elements(AAZIntType, ".")
months = _builder.get(".properties.maintenanceWindow.months")
if months is not None:
months.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.maintenanceWindow.months[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
weeks_of_month = _builder.get(
".properties.maintenanceWindow.weeksOfMonth")
if weeks_of_month is not None:
weeks_of_month.set_elements(AAZIntType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
zones = _builder.get(".zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 37 | 7 | 31 | 0 | 7 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 77 | 15 | 62 | 14 | 59 | 0 | 58 | 14 | 55 | 13 | 1 | 1 | 14 |
8,578 |
Azure/azure-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/autonomous_database/_switchover.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._switchover.Switchover.AutonomousDatabasesSwitchover
|
class AutonomousDatabasesSwitchover(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/autonomousDatabases/{autonomousdatabasename}/switchover",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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("peerDbId", AAZStrType, ".peer_db_id")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
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.actual_used_data_storage_size_in_tbs = AAZFloatType(
serialized_name="actualUsedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.allocated_storage_size_in_tbs = AAZFloatType(
serialized_name="allocatedStorageSizeInTbs",
flags={"read_only": True},
)
properties.apex_details = AAZObjectType(
serialized_name="apexDetails",
)
properties.autonomous_database_id = AAZStrType(
serialized_name="autonomousDatabaseId",
)
properties.autonomous_maintenance_schedule_type = AAZStrType(
serialized_name="autonomousMaintenanceScheduleType",
)
properties.available_upgrade_versions = AAZListType(
serialized_name="availableUpgradeVersions",
flags={"read_only": True},
)
properties.backup_retention_period_in_days = AAZIntType(
serialized_name="backupRetentionPeriodInDays",
)
properties.character_set = AAZStrType(
serialized_name="characterSet",
)
properties.compute_count = AAZFloatType(
serialized_name="computeCount",
)
properties.compute_model = AAZStrType(
serialized_name="computeModel",
)
properties.connection_strings = AAZObjectType(
serialized_name="connectionStrings",
)
properties.connection_urls = AAZObjectType(
serialized_name="connectionUrls",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_base_type = AAZStrType(
serialized_name="dataBaseType",
)
properties.data_safe_status = AAZStrType(
serialized_name="dataSafeStatus",
)
properties.data_storage_size_in_gbs = AAZIntType(
serialized_name="dataStorageSizeInGbs",
)
properties.data_storage_size_in_tbs = AAZIntType(
serialized_name="dataStorageSizeInTbs",
)
properties.database_edition = AAZStrType(
serialized_name="databaseEdition",
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
)
properties.db_workload = AAZStrType(
serialized_name="dbWorkload",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.failed_data_recovery_in_seconds = AAZIntType(
serialized_name="failedDataRecoveryInSeconds",
flags={"read_only": True},
)
properties.in_memory_area_in_gbs = AAZIntType(
serialized_name="inMemoryAreaInGbs",
flags={"read_only": True},
)
properties.is_auto_scaling_enabled = AAZBoolType(
serialized_name="isAutoScalingEnabled",
)
properties.is_auto_scaling_for_storage_enabled = AAZBoolType(
serialized_name="isAutoScalingForStorageEnabled",
)
properties.is_local_data_guard_enabled = AAZBoolType(
serialized_name="isLocalDataGuardEnabled",
)
properties.is_mtls_connection_required = AAZBoolType(
serialized_name="isMtlsConnectionRequired",
)
properties.is_preview = AAZBoolType(
serialized_name="isPreview",
flags={"read_only": True},
)
properties.is_remote_data_guard_enabled = AAZBoolType(
serialized_name="isRemoteDataGuardEnabled",
flags={"read_only": True},
)
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.local_adg_auto_failover_max_data_loss_limit = AAZIntType(
serialized_name="localAdgAutoFailoverMaxDataLossLimit",
)
properties.local_disaster_recovery_type = AAZStrType(
serialized_name="localDisasterRecoveryType",
)
properties.local_standby_db = AAZObjectType(
serialized_name="localStandbyDb",
)
properties.long_term_backup_schedule = AAZObjectType(
serialized_name="longTermBackupSchedule",
)
properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType(
serialized_name="memoryPerOracleComputeUnitInGbs",
flags={"read_only": True},
)
properties.ncharacter_set = AAZStrType(
serialized_name="ncharacterSet",
)
properties.next_long_term_backup_time_stamp = AAZStrType(
serialized_name="nextLongTermBackupTimeStamp",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.open_mode = AAZStrType(
serialized_name="openMode",
)
properties.operations_insights_status = AAZStrType(
serialized_name="operationsInsightsStatus",
)
properties.peer_db_ids = AAZListType(
serialized_name="peerDbIds",
flags={"read_only": True},
)
properties.permission_level = AAZStrType(
serialized_name="permissionLevel",
)
properties.private_endpoint = AAZStrType(
serialized_name="privateEndpoint",
flags={"read_only": True},
)
properties.private_endpoint_ip = AAZStrType(
serialized_name="privateEndpointIp",
)
properties.private_endpoint_label = AAZStrType(
serialized_name="privateEndpointLabel",
)
properties.provisionable_cpus = AAZListType(
serialized_name="provisionableCpus",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.role = AAZStrType()
properties.scheduled_operations = AAZObjectType(
serialized_name="scheduledOperations",
)
properties.service_console_url = AAZStrType(
serialized_name="serviceConsoleUrl",
flags={"read_only": True},
)
properties.sql_web_developer_url = AAZStrType(
serialized_name="sqlWebDeveloperUrl",
flags={"read_only": True},
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
)
properties.supported_regions_to_clone_to = AAZListType(
serialized_name="supportedRegionsToCloneTo",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
flags={"read_only": True},
)
properties.time_deletion_of_free_autonomous_database = AAZStrType(
serialized_name="timeDeletionOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.time_local_data_guard_enabled = AAZStrType(
serialized_name="timeLocalDataGuardEnabled",
flags={"read_only": True},
)
properties.time_maintenance_begin = AAZStrType(
serialized_name="timeMaintenanceBegin",
flags={"read_only": True},
)
properties.time_maintenance_end = AAZStrType(
serialized_name="timeMaintenanceEnd",
flags={"read_only": True},
)
properties.time_of_last_failover = AAZStrType(
serialized_name="timeOfLastFailover",
flags={"read_only": True},
)
properties.time_of_last_refresh = AAZStrType(
serialized_name="timeOfLastRefresh",
flags={"read_only": True},
)
properties.time_of_last_refresh_point = AAZStrType(
serialized_name="timeOfLastRefreshPoint",
flags={"read_only": True},
)
properties.time_of_last_switchover = AAZStrType(
serialized_name="timeOfLastSwitchover",
flags={"read_only": True},
)
properties.time_reclamation_of_free_autonomous_database = AAZStrType(
serialized_name="timeReclamationOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.used_data_storage_size_in_gbs = AAZIntType(
serialized_name="usedDataStorageSizeInGbs",
flags={"read_only": True},
)
properties.used_data_storage_size_in_tbs = AAZIntType(
serialized_name="usedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
)
properties.whitelisted_ips = AAZListType(
serialized_name="whitelistedIps",
)
apex_details = cls._schema_on_200.properties.apex_details
apex_details.apex_version = AAZStrType(
serialized_name="apexVersion",
)
apex_details.ords_version = AAZStrType(
serialized_name="ordsVersion",
)
available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions
available_upgrade_versions.Element = AAZStrType()
connection_strings = cls._schema_on_200.properties.connection_strings
connection_strings.all_connection_strings = AAZObjectType(
serialized_name="allConnectionStrings",
)
connection_strings.dedicated = AAZStrType()
connection_strings.high = AAZStrType()
connection_strings.low = AAZStrType()
connection_strings.medium = AAZStrType()
connection_strings.profiles = AAZListType()
all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings
all_connection_strings.high = AAZStrType()
all_connection_strings.low = AAZStrType()
all_connection_strings.medium = AAZStrType()
profiles = cls._schema_on_200.properties.connection_strings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.connection_strings.profiles.Element
_element.consumer_group = AAZStrType(
serialized_name="consumerGroup",
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.host_format = AAZStrType(
serialized_name="hostFormat",
flags={"required": True},
)
_element.is_regional = AAZBoolType(
serialized_name="isRegional",
)
_element.protocol = AAZStrType(
flags={"required": True},
)
_element.session_mode = AAZStrType(
serialized_name="sessionMode",
flags={"required": True},
)
_element.syntax_format = AAZStrType(
serialized_name="syntaxFormat",
flags={"required": True},
)
_element.tls_authentication = AAZStrType(
serialized_name="tlsAuthentication",
)
_element.value = AAZStrType(
flags={"required": True},
)
connection_urls = cls._schema_on_200.properties.connection_urls
connection_urls.apex_url = AAZStrType(
serialized_name="apexUrl",
)
connection_urls.database_transforms_url = AAZStrType(
serialized_name="databaseTransformsUrl",
)
connection_urls.graph_studio_url = AAZStrType(
serialized_name="graphStudioUrl",
)
connection_urls.machine_learning_notebook_url = AAZStrType(
serialized_name="machineLearningNotebookUrl",
)
connection_urls.mongo_db_url = AAZStrType(
serialized_name="mongoDbUrl",
)
connection_urls.ords_url = AAZStrType(
serialized_name="ordsUrl",
)
connection_urls.sql_dev_web_url = AAZStrType(
serialized_name="sqlDevWebUrl",
)
customer_contacts = cls._schema_on_200.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
local_standby_db = cls._schema_on_200.properties.local_standby_db
local_standby_db.lag_time_in_seconds = AAZIntType(
serialized_name="lagTimeInSeconds",
)
local_standby_db.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
local_standby_db.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
local_standby_db.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
)
local_standby_db.time_disaster_recovery_role_changed = AAZStrType(
serialized_name="timeDisasterRecoveryRoleChanged",
)
long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule
long_term_backup_schedule.is_disabled = AAZBoolType(
serialized_name="isDisabled",
)
long_term_backup_schedule.repeat_cadence = AAZStrType(
serialized_name="repeatCadence",
)
long_term_backup_schedule.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
long_term_backup_schedule.time_of_backup = AAZStrType(
serialized_name="timeOfBackup",
)
peer_db_ids = cls._schema_on_200.properties.peer_db_ids
peer_db_ids.Element = AAZStrType()
provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus
provisionable_cpus.Element = AAZIntType()
scheduled_operations = cls._schema_on_200.properties.scheduled_operations
scheduled_operations.day_of_week = AAZObjectType(
serialized_name="dayOfWeek",
flags={"required": True},
)
scheduled_operations.scheduled_start_time = AAZStrType(
serialized_name="scheduledStartTime",
)
scheduled_operations.scheduled_stop_time = AAZStrType(
serialized_name="scheduledStopTime",
)
day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week
day_of_week.name = AAZStrType(
flags={"required": True},
)
supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to
supported_regions_to_clone_to.Element = AAZStrType()
whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips
whitelisted_ips.Element = AAZStrType()
disc_clone = cls._schema_on_200.properties.discriminate_by(
"data_base_type", "Clone")
disc_clone.is_reconnect_clone_enabled = AAZBoolType(
serialized_name="isReconnectCloneEnabled",
flags={"read_only": True},
)
disc_clone.is_refreshable_clone = AAZBoolType(
serialized_name="isRefreshableClone",
flags={"read_only": True},
)
disc_clone.refreshable_status = AAZStrType(
serialized_name="refreshableStatus",
)
disc_clone.source_id = AAZStrType(
serialized_name="sourceId",
flags={"required": True},
)
disc_clone.time_until_reconnect_clone_enabled = AAZStrType(
serialized_name="timeUntilReconnectCloneEnabled",
)
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 AutonomousDatabasesSwitchover(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 | 55 | 3 | 53 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 574 | 37 | 537 | 50 | 518 | 0 | 199 | 41 | 188 | 3 | 1 | 1 | 13 |
8,579 |
Azure/azure-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/autonomous_database/_restore.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._restore.Restore.AutonomousDatabasesRestore
|
class AutonomousDatabasesRestore(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/autonomousDatabases/{autonomousdatabasename}/restore",
**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(
"autonomousdatabasename", self.ctx.args.autonomousdatabasename,
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("timestamp", AAZStrType, ".timestamp", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.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.actual_used_data_storage_size_in_tbs = AAZFloatType(
serialized_name="actualUsedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.allocated_storage_size_in_tbs = AAZFloatType(
serialized_name="allocatedStorageSizeInTbs",
flags={"read_only": True},
)
properties.apex_details = AAZObjectType(
serialized_name="apexDetails",
)
properties.autonomous_database_id = AAZStrType(
serialized_name="autonomousDatabaseId",
)
properties.autonomous_maintenance_schedule_type = AAZStrType(
serialized_name="autonomousMaintenanceScheduleType",
)
properties.available_upgrade_versions = AAZListType(
serialized_name="availableUpgradeVersions",
flags={"read_only": True},
)
properties.backup_retention_period_in_days = AAZIntType(
serialized_name="backupRetentionPeriodInDays",
)
properties.character_set = AAZStrType(
serialized_name="characterSet",
)
properties.compute_count = AAZFloatType(
serialized_name="computeCount",
)
properties.compute_model = AAZStrType(
serialized_name="computeModel",
)
properties.connection_strings = AAZObjectType(
serialized_name="connectionStrings",
)
properties.connection_urls = AAZObjectType(
serialized_name="connectionUrls",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_safe_status = AAZStrType(
serialized_name="dataSafeStatus",
)
properties.data_storage_size_in_gbs = AAZIntType(
serialized_name="dataStorageSizeInGbs",
)
properties.data_storage_size_in_tbs = AAZIntType(
serialized_name="dataStorageSizeInTbs",
)
properties.database_edition = AAZStrType(
serialized_name="databaseEdition",
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
)
properties.db_workload = AAZStrType(
serialized_name="dbWorkload",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.failed_data_recovery_in_seconds = AAZIntType(
serialized_name="failedDataRecoveryInSeconds",
flags={"read_only": True},
)
properties.in_memory_area_in_gbs = AAZIntType(
serialized_name="inMemoryAreaInGbs",
flags={"read_only": True},
)
properties.is_auto_scaling_enabled = AAZBoolType(
serialized_name="isAutoScalingEnabled",
)
properties.is_auto_scaling_for_storage_enabled = AAZBoolType(
serialized_name="isAutoScalingForStorageEnabled",
)
properties.is_local_data_guard_enabled = AAZBoolType(
serialized_name="isLocalDataGuardEnabled",
)
properties.is_mtls_connection_required = AAZBoolType(
serialized_name="isMtlsConnectionRequired",
)
properties.is_preview = AAZBoolType(
serialized_name="isPreview",
flags={"read_only": True},
)
properties.is_remote_data_guard_enabled = AAZBoolType(
serialized_name="isRemoteDataGuardEnabled",
flags={"read_only": True},
)
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.local_adg_auto_failover_max_data_loss_limit = AAZIntType(
serialized_name="localAdgAutoFailoverMaxDataLossLimit",
)
properties.local_disaster_recovery_type = AAZStrType(
serialized_name="localDisasterRecoveryType",
)
properties.local_standby_db = AAZObjectType(
serialized_name="localStandbyDb",
)
properties.long_term_backup_schedule = AAZObjectType(
serialized_name="longTermBackupSchedule",
)
properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType(
serialized_name="memoryPerOracleComputeUnitInGbs",
flags={"read_only": True},
)
properties.ncharacter_set = AAZStrType(
serialized_name="ncharacterSet",
)
properties.next_long_term_backup_time_stamp = AAZStrType(
serialized_name="nextLongTermBackupTimeStamp",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.open_mode = AAZStrType(
serialized_name="openMode",
)
properties.operations_insights_status = AAZStrType(
serialized_name="operationsInsightsStatus",
)
properties.peer_db_ids = AAZListType(
serialized_name="peerDbIds",
flags={"read_only": True},
)
properties.permission_level = AAZStrType(
serialized_name="permissionLevel",
)
properties.private_endpoint = AAZStrType(
serialized_name="privateEndpoint",
flags={"read_only": True},
)
properties.private_endpoint_ip = AAZStrType(
serialized_name="privateEndpointIp",
)
properties.private_endpoint_label = AAZStrType(
serialized_name="privateEndpointLabel",
)
properties.provisionable_cpus = AAZListType(
serialized_name="provisionableCpus",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.role = AAZStrType()
properties.scheduled_operations = AAZObjectType(
serialized_name="scheduledOperations",
)
properties.service_console_url = AAZStrType(
serialized_name="serviceConsoleUrl",
flags={"read_only": True},
)
properties.sql_web_developer_url = AAZStrType(
serialized_name="sqlWebDeveloperUrl",
flags={"read_only": True},
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
)
properties.supported_regions_to_clone_to = AAZListType(
serialized_name="supportedRegionsToCloneTo",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
flags={"read_only": True},
)
properties.time_deletion_of_free_autonomous_database = AAZStrType(
serialized_name="timeDeletionOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.time_local_data_guard_enabled = AAZStrType(
serialized_name="timeLocalDataGuardEnabled",
flags={"read_only": True},
)
properties.time_maintenance_begin = AAZStrType(
serialized_name="timeMaintenanceBegin",
flags={"read_only": True},
)
properties.time_maintenance_end = AAZStrType(
serialized_name="timeMaintenanceEnd",
flags={"read_only": True},
)
properties.time_of_last_failover = AAZStrType(
serialized_name="timeOfLastFailover",
flags={"read_only": True},
)
properties.time_of_last_refresh = AAZStrType(
serialized_name="timeOfLastRefresh",
flags={"read_only": True},
)
properties.time_of_last_refresh_point = AAZStrType(
serialized_name="timeOfLastRefreshPoint",
flags={"read_only": True},
)
properties.time_of_last_switchover = AAZStrType(
serialized_name="timeOfLastSwitchover",
flags={"read_only": True},
)
properties.time_reclamation_of_free_autonomous_database = AAZStrType(
serialized_name="timeReclamationOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.used_data_storage_size_in_gbs = AAZIntType(
serialized_name="usedDataStorageSizeInGbs",
flags={"read_only": True},
)
properties.used_data_storage_size_in_tbs = AAZIntType(
serialized_name="usedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
)
properties.whitelisted_ips = AAZListType(
serialized_name="whitelistedIps",
)
apex_details = cls._schema_on_200.properties.apex_details
apex_details.apex_version = AAZStrType(
serialized_name="apexVersion",
)
apex_details.ords_version = AAZStrType(
serialized_name="ordsVersion",
)
available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions
available_upgrade_versions.Element = AAZStrType()
connection_strings = cls._schema_on_200.properties.connection_strings
connection_strings.all_connection_strings = AAZObjectType(
serialized_name="allConnectionStrings",
)
connection_strings.dedicated = AAZStrType()
connection_strings.high = AAZStrType()
connection_strings.low = AAZStrType()
connection_strings.medium = AAZStrType()
connection_strings.profiles = AAZListType()
all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings
all_connection_strings.high = AAZStrType()
all_connection_strings.low = AAZStrType()
all_connection_strings.medium = AAZStrType()
profiles = cls._schema_on_200.properties.connection_strings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.properties.connection_strings.profiles.Element
_element.consumer_group = AAZStrType(
serialized_name="consumerGroup",
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.host_format = AAZStrType(
serialized_name="hostFormat",
flags={"required": True},
)
_element.is_regional = AAZBoolType(
serialized_name="isRegional",
)
_element.protocol = AAZStrType(
flags={"required": True},
)
_element.session_mode = AAZStrType(
serialized_name="sessionMode",
flags={"required": True},
)
_element.syntax_format = AAZStrType(
serialized_name="syntaxFormat",
flags={"required": True},
)
_element.tls_authentication = AAZStrType(
serialized_name="tlsAuthentication",
)
_element.value = AAZStrType(
flags={"required": True},
)
connection_urls = cls._schema_on_200.properties.connection_urls
connection_urls.apex_url = AAZStrType(
serialized_name="apexUrl",
)
connection_urls.database_transforms_url = AAZStrType(
serialized_name="databaseTransformsUrl",
)
connection_urls.graph_studio_url = AAZStrType(
serialized_name="graphStudioUrl",
)
connection_urls.machine_learning_notebook_url = AAZStrType(
serialized_name="machineLearningNotebookUrl",
)
connection_urls.mongo_db_url = AAZStrType(
serialized_name="mongoDbUrl",
)
connection_urls.ords_url = AAZStrType(
serialized_name="ordsUrl",
)
connection_urls.sql_dev_web_url = AAZStrType(
serialized_name="sqlDevWebUrl",
)
customer_contacts = cls._schema_on_200.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
local_standby_db = cls._schema_on_200.properties.local_standby_db
local_standby_db.lag_time_in_seconds = AAZIntType(
serialized_name="lagTimeInSeconds",
)
local_standby_db.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
local_standby_db.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
local_standby_db.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
)
local_standby_db.time_disaster_recovery_role_changed = AAZStrType(
serialized_name="timeDisasterRecoveryRoleChanged",
)
long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule
long_term_backup_schedule.is_disabled = AAZBoolType(
serialized_name="isDisabled",
)
long_term_backup_schedule.repeat_cadence = AAZStrType(
serialized_name="repeatCadence",
)
long_term_backup_schedule.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
long_term_backup_schedule.time_of_backup = AAZStrType(
serialized_name="timeOfBackup",
)
peer_db_ids = cls._schema_on_200.properties.peer_db_ids
peer_db_ids.Element = AAZStrType()
provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus
provisionable_cpus.Element = AAZIntType()
scheduled_operations = cls._schema_on_200.properties.scheduled_operations
scheduled_operations.day_of_week = AAZObjectType(
serialized_name="dayOfWeek",
flags={"required": True},
)
scheduled_operations.scheduled_start_time = AAZStrType(
serialized_name="scheduledStartTime",
)
scheduled_operations.scheduled_stop_time = AAZStrType(
serialized_name="scheduledStopTime",
)
day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week
day_of_week.name = AAZStrType(
flags={"required": True},
)
supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to
supported_regions_to_clone_to.Element = AAZStrType()
whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips
whitelisted_ips.Element = AAZStrType()
disc_clone = cls._schema_on_200.properties.discriminate_by(
"data_base_type", "Clone")
disc_clone.is_reconnect_clone_enabled = AAZBoolType(
serialized_name="isReconnectCloneEnabled",
flags={"read_only": True},
)
disc_clone.is_refreshable_clone = AAZBoolType(
serialized_name="isRefreshableClone",
flags={"read_only": True},
)
disc_clone.refreshable_status = AAZStrType(
serialized_name="refreshableStatus",
)
disc_clone.source_id = AAZStrType(
serialized_name="sourceId",
flags={"required": True},
)
disc_clone.time_until_reconnect_clone_enabled = AAZStrType(
serialized_name="timeUntilReconnectCloneEnabled",
)
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 AutonomousDatabasesRestore(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 | 55 | 3 | 52 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 571 | 37 | 534 | 50 | 515 | 0 | 198 | 41 | 187 | 3 | 1 | 1 | 13 |
8,580 |
Azure/azure-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/autonomous_database/_list.py
|
azext_oracle_database.aaz.latest.oracle_database.autonomous_database._list.List.AutonomousDatabasesListBySubscription
|
class AutonomousDatabasesListBySubscription(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/autonomousDatabases",
**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.actual_used_data_storage_size_in_tbs = AAZFloatType(
serialized_name="actualUsedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.allocated_storage_size_in_tbs = AAZFloatType(
serialized_name="allocatedStorageSizeInTbs",
flags={"read_only": True},
)
properties.apex_details = AAZObjectType(
serialized_name="apexDetails",
)
properties.autonomous_database_id = AAZStrType(
serialized_name="autonomousDatabaseId",
)
properties.autonomous_maintenance_schedule_type = AAZStrType(
serialized_name="autonomousMaintenanceScheduleType",
)
properties.available_upgrade_versions = AAZListType(
serialized_name="availableUpgradeVersions",
flags={"read_only": True},
)
properties.backup_retention_period_in_days = AAZIntType(
serialized_name="backupRetentionPeriodInDays",
)
properties.character_set = AAZStrType(
serialized_name="characterSet",
)
properties.compute_count = AAZFloatType(
serialized_name="computeCount",
)
properties.compute_model = AAZStrType(
serialized_name="computeModel",
)
properties.connection_strings = AAZObjectType(
serialized_name="connectionStrings",
)
properties.connection_urls = AAZObjectType(
serialized_name="connectionUrls",
)
properties.cpu_core_count = AAZIntType(
serialized_name="cpuCoreCount",
)
properties.customer_contacts = AAZListType(
serialized_name="customerContacts",
)
properties.data_base_type = AAZStrType(
serialized_name="dataBaseType",
)
properties.data_safe_status = AAZStrType(
serialized_name="dataSafeStatus",
)
properties.data_storage_size_in_gbs = AAZIntType(
serialized_name="dataStorageSizeInGbs",
)
properties.data_storage_size_in_tbs = AAZIntType(
serialized_name="dataStorageSizeInTbs",
)
properties.database_edition = AAZStrType(
serialized_name="databaseEdition",
)
properties.db_version = AAZStrType(
serialized_name="dbVersion",
)
properties.db_workload = AAZStrType(
serialized_name="dbWorkload",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.failed_data_recovery_in_seconds = AAZIntType(
serialized_name="failedDataRecoveryInSeconds",
flags={"read_only": True},
)
properties.in_memory_area_in_gbs = AAZIntType(
serialized_name="inMemoryAreaInGbs",
flags={"read_only": True},
)
properties.is_auto_scaling_enabled = AAZBoolType(
serialized_name="isAutoScalingEnabled",
)
properties.is_auto_scaling_for_storage_enabled = AAZBoolType(
serialized_name="isAutoScalingForStorageEnabled",
)
properties.is_local_data_guard_enabled = AAZBoolType(
serialized_name="isLocalDataGuardEnabled",
)
properties.is_mtls_connection_required = AAZBoolType(
serialized_name="isMtlsConnectionRequired",
)
properties.is_preview = AAZBoolType(
serialized_name="isPreview",
flags={"read_only": True},
)
properties.is_remote_data_guard_enabled = AAZBoolType(
serialized_name="isRemoteDataGuardEnabled",
flags={"read_only": True},
)
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.local_adg_auto_failover_max_data_loss_limit = AAZIntType(
serialized_name="localAdgAutoFailoverMaxDataLossLimit",
)
properties.local_disaster_recovery_type = AAZStrType(
serialized_name="localDisasterRecoveryType",
)
properties.local_standby_db = AAZObjectType(
serialized_name="localStandbyDb",
)
properties.long_term_backup_schedule = AAZObjectType(
serialized_name="longTermBackupSchedule",
)
properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType(
serialized_name="memoryPerOracleComputeUnitInGbs",
flags={"read_only": True},
)
properties.ncharacter_set = AAZStrType(
serialized_name="ncharacterSet",
)
properties.next_long_term_backup_time_stamp = AAZStrType(
serialized_name="nextLongTermBackupTimeStamp",
flags={"read_only": True},
)
properties.oci_url = AAZStrType(
serialized_name="ociUrl",
flags={"read_only": True},
)
properties.ocid = AAZStrType()
properties.open_mode = AAZStrType(
serialized_name="openMode",
)
properties.operations_insights_status = AAZStrType(
serialized_name="operationsInsightsStatus",
)
properties.peer_db_ids = AAZListType(
serialized_name="peerDbIds",
flags={"read_only": True},
)
properties.permission_level = AAZStrType(
serialized_name="permissionLevel",
)
properties.private_endpoint = AAZStrType(
serialized_name="privateEndpoint",
flags={"read_only": True},
)
properties.private_endpoint_ip = AAZStrType(
serialized_name="privateEndpointIp",
)
properties.private_endpoint_label = AAZStrType(
serialized_name="privateEndpointLabel",
)
properties.provisionable_cpus = AAZListType(
serialized_name="provisionableCpus",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.role = AAZStrType()
properties.scheduled_operations = AAZObjectType(
serialized_name="scheduledOperations",
)
properties.service_console_url = AAZStrType(
serialized_name="serviceConsoleUrl",
flags={"read_only": True},
)
properties.sql_web_developer_url = AAZStrType(
serialized_name="sqlWebDeveloperUrl",
flags={"read_only": True},
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
)
properties.supported_regions_to_clone_to = AAZListType(
serialized_name="supportedRegionsToCloneTo",
flags={"read_only": True},
)
properties.time_created = AAZStrType(
serialized_name="timeCreated",
flags={"read_only": True},
)
properties.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
flags={"read_only": True},
)
properties.time_deletion_of_free_autonomous_database = AAZStrType(
serialized_name="timeDeletionOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.time_local_data_guard_enabled = AAZStrType(
serialized_name="timeLocalDataGuardEnabled",
flags={"read_only": True},
)
properties.time_maintenance_begin = AAZStrType(
serialized_name="timeMaintenanceBegin",
flags={"read_only": True},
)
properties.time_maintenance_end = AAZStrType(
serialized_name="timeMaintenanceEnd",
flags={"read_only": True},
)
properties.time_of_last_failover = AAZStrType(
serialized_name="timeOfLastFailover",
flags={"read_only": True},
)
properties.time_of_last_refresh = AAZStrType(
serialized_name="timeOfLastRefresh",
flags={"read_only": True},
)
properties.time_of_last_refresh_point = AAZStrType(
serialized_name="timeOfLastRefreshPoint",
flags={"read_only": True},
)
properties.time_of_last_switchover = AAZStrType(
serialized_name="timeOfLastSwitchover",
flags={"read_only": True},
)
properties.time_reclamation_of_free_autonomous_database = AAZStrType(
serialized_name="timeReclamationOfFreeAutonomousDatabase",
flags={"read_only": True},
)
properties.used_data_storage_size_in_gbs = AAZIntType(
serialized_name="usedDataStorageSizeInGbs",
flags={"read_only": True},
)
properties.used_data_storage_size_in_tbs = AAZIntType(
serialized_name="usedDataStorageSizeInTbs",
flags={"read_only": True},
)
properties.vnet_id = AAZStrType(
serialized_name="vnetId",
)
properties.whitelisted_ips = AAZListType(
serialized_name="whitelistedIps",
)
apex_details = cls._schema_on_200.value.Element.properties.apex_details
apex_details.apex_version = AAZStrType(
serialized_name="apexVersion",
)
apex_details.ords_version = AAZStrType(
serialized_name="ordsVersion",
)
available_upgrade_versions = cls._schema_on_200.value.Element.properties.available_upgrade_versions
available_upgrade_versions.Element = AAZStrType()
connection_strings = cls._schema_on_200.value.Element.properties.connection_strings
connection_strings.all_connection_strings = AAZObjectType(
serialized_name="allConnectionStrings",
)
connection_strings.dedicated = AAZStrType()
connection_strings.high = AAZStrType()
connection_strings.low = AAZStrType()
connection_strings.medium = AAZStrType()
connection_strings.profiles = AAZListType()
all_connection_strings = cls._schema_on_200.value.Element.properties.connection_strings.all_connection_strings
all_connection_strings.high = AAZStrType()
all_connection_strings.low = AAZStrType()
all_connection_strings.medium = AAZStrType()
profiles = cls._schema_on_200.value.Element.properties.connection_strings.profiles
profiles.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.connection_strings.profiles.Element
_element.consumer_group = AAZStrType(
serialized_name="consumerGroup",
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.host_format = AAZStrType(
serialized_name="hostFormat",
flags={"required": True},
)
_element.is_regional = AAZBoolType(
serialized_name="isRegional",
)
_element.protocol = AAZStrType(
flags={"required": True},
)
_element.session_mode = AAZStrType(
serialized_name="sessionMode",
flags={"required": True},
)
_element.syntax_format = AAZStrType(
serialized_name="syntaxFormat",
flags={"required": True},
)
_element.tls_authentication = AAZStrType(
serialized_name="tlsAuthentication",
)
_element.value = AAZStrType(
flags={"required": True},
)
connection_urls = cls._schema_on_200.value.Element.properties.connection_urls
connection_urls.apex_url = AAZStrType(
serialized_name="apexUrl",
)
connection_urls.database_transforms_url = AAZStrType(
serialized_name="databaseTransformsUrl",
)
connection_urls.graph_studio_url = AAZStrType(
serialized_name="graphStudioUrl",
)
connection_urls.machine_learning_notebook_url = AAZStrType(
serialized_name="machineLearningNotebookUrl",
)
connection_urls.mongo_db_url = AAZStrType(
serialized_name="mongoDbUrl",
)
connection_urls.ords_url = AAZStrType(
serialized_name="ordsUrl",
)
connection_urls.sql_dev_web_url = AAZStrType(
serialized_name="sqlDevWebUrl",
)
customer_contacts = cls._schema_on_200.value.Element.properties.customer_contacts
customer_contacts.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.customer_contacts.Element
_element.email = AAZStrType(
flags={"required": True},
)
local_standby_db = cls._schema_on_200.value.Element.properties.local_standby_db
local_standby_db.lag_time_in_seconds = AAZIntType(
serialized_name="lagTimeInSeconds",
)
local_standby_db.lifecycle_details = AAZStrType(
serialized_name="lifecycleDetails",
)
local_standby_db.lifecycle_state = AAZStrType(
serialized_name="lifecycleState",
)
local_standby_db.time_data_guard_role_changed = AAZStrType(
serialized_name="timeDataGuardRoleChanged",
)
local_standby_db.time_disaster_recovery_role_changed = AAZStrType(
serialized_name="timeDisasterRecoveryRoleChanged",
)
long_term_backup_schedule = cls._schema_on_200.value.Element.properties.long_term_backup_schedule
long_term_backup_schedule.is_disabled = AAZBoolType(
serialized_name="isDisabled",
)
long_term_backup_schedule.repeat_cadence = AAZStrType(
serialized_name="repeatCadence",
)
long_term_backup_schedule.retention_period_in_days = AAZIntType(
serialized_name="retentionPeriodInDays",
)
long_term_backup_schedule.time_of_backup = AAZStrType(
serialized_name="timeOfBackup",
)
peer_db_ids = cls._schema_on_200.value.Element.properties.peer_db_ids
peer_db_ids.Element = AAZStrType()
provisionable_cpus = cls._schema_on_200.value.Element.properties.provisionable_cpus
provisionable_cpus.Element = AAZIntType()
scheduled_operations = cls._schema_on_200.value.Element.properties.scheduled_operations
scheduled_operations.day_of_week = AAZObjectType(
serialized_name="dayOfWeek",
flags={"required": True},
)
scheduled_operations.scheduled_start_time = AAZStrType(
serialized_name="scheduledStartTime",
)
scheduled_operations.scheduled_stop_time = AAZStrType(
serialized_name="scheduledStopTime",
)
day_of_week = cls._schema_on_200.value.Element.properties.scheduled_operations.day_of_week
day_of_week.name = AAZStrType(
flags={"required": True},
)
supported_regions_to_clone_to = cls._schema_on_200.value.Element.properties.supported_regions_to_clone_to
supported_regions_to_clone_to.Element = AAZStrType()
whitelisted_ips = cls._schema_on_200.value.Element.properties.whitelisted_ips
whitelisted_ips.Element = AAZStrType()
disc_clone = cls._schema_on_200.value.Element.properties.discriminate_by(
"data_base_type", "Clone")
disc_clone.is_reconnect_clone_enabled = AAZBoolType(
serialized_name="isReconnectCloneEnabled",
flags={"read_only": True},
)
disc_clone.is_refreshable_clone = AAZBoolType(
serialized_name="isRefreshableClone",
flags={"read_only": True},
)
disc_clone.refreshable_status = AAZStrType(
serialized_name="refreshableStatus",
)
disc_clone.source_id = AAZStrType(
serialized_name="sourceId",
flags={"required": True},
)
disc_clone.time_until_reconnect_clone_enabled = AAZStrType(
serialized_name="timeUntilReconnectCloneEnabled",
)
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 AutonomousDatabasesListBySubscription(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 | 59 | 3 | 56 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 547 | 37 | 510 | 47 | 493 | 0 | 198 | 40 | 188 | 2 | 1 | 1 | 11 |
8,581 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/logging_configuration/_show.py
|
azext_nsp.aaz.latest.network.perimeter.logging_configuration._show.Show.NspLoggingConfigurationGet
|
class NspLoggingConfigurationGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"loggingConfigurationName", self.ctx.args.logging_configuration_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.enabled_log_categories = AAZListType(
serialized_name="enabledLogCategories",
)
properties.version = AAZStrType()
enabled_log_categories = cls._schema_on_200.properties.enabled_log_categories
enabled_log_categories.Element = AAZStrType()
return cls._schema_on_200
|
class NspLoggingConfigurationGet(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 | 109 | 16 | 93 | 28 | 76 | 0 | 43 | 21 | 33 | 2 | 1 | 1 | 11 |
8,582 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/logging_configuration/_delete.py
|
azext_nsp.aaz.latest.network.perimeter.logging_configuration._delete.Delete.NspLoggingConfigurationDelete
|
class NspLoggingConfigurationDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"loggingConfigurationName", self.ctx.args.logging_configuration_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class NspLoggingConfigurationDelete(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 |
8,583 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/logging_configuration/_create.py
|
azext_nsp.aaz.latest.network.perimeter.logging_configuration._create.Create.NspLoggingConfigurationCreateOrUpdate
|
class NspLoggingConfigurationCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"loggingConfigurationName", self.ctx.args.logging_configuration_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("enabledLogCategories",
AAZListType, ".enabled_log_categories")
properties.set_prop("version", AAZStrType, ".version")
enabled_log_categories = _builder.get(
".properties.enabledLogCategories")
if enabled_log_categories is not None:
enabled_log_categories.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.etag = AAZStrType(
flags={"read_only": True},
)
_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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.enabled_log_categories = AAZListType(
serialized_name="enabledLogCategories",
)
properties.version = AAZStrType()
enabled_log_categories = cls._schema_on_200.properties.enabled_log_categories
enabled_log_categories.Element = AAZStrType()
return cls._schema_on_200
|
class NspLoggingConfigurationCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 132 | 20 | 112 | 33 | 93 | 0 | 54 | 25 | 43 | 3 | 1 | 1 | 14 |
8,584 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link_reference/_wait.py
|
azext_nsp.aaz.latest.network.perimeter.link_reference._wait.Wait.NspLinkReferencesGet
|
class NspLinkReferencesGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkReferenceName", self.ctx.args.link_reference_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.description = AAZStrType(
flags={"read_only": True},
)
properties.local_inbound_profiles = AAZListType(
serialized_name="localInboundProfiles",
)
properties.local_outbound_profiles = AAZListType(
serialized_name="localOutboundProfiles",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.remote_inbound_profiles = AAZListType(
serialized_name="remoteInboundProfiles",
flags={"read_only": True},
)
properties.remote_outbound_profiles = AAZListType(
serialized_name="remoteOutboundProfiles",
flags={"read_only": True},
)
properties.remote_perimeter_guid = AAZStrType(
serialized_name="remotePerimeterGuid",
flags={"read_only": True},
)
properties.remote_perimeter_location = AAZStrType(
serialized_name="remotePerimeterLocation",
flags={"read_only": True},
)
properties.remote_perimeter_resource_id = AAZStrType(
serialized_name="remotePerimeterResourceId",
flags={"read_only": True},
)
properties.status = AAZStrType()
local_inbound_profiles = cls._schema_on_200.properties.local_inbound_profiles
local_inbound_profiles.Element = AAZStrType()
local_outbound_profiles = cls._schema_on_200.properties.local_outbound_profiles
local_outbound_profiles.Element = AAZStrType()
remote_inbound_profiles = cls._schema_on_200.properties.remote_inbound_profiles
remote_inbound_profiles.Element = AAZStrType()
remote_outbound_profiles = cls._schema_on_200.properties.remote_outbound_profiles
remote_outbound_profiles.Element = AAZStrType()
return cls._schema_on_200
|
class NspLinkReferencesGet(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 | 149 | 19 | 130 | 31 | 113 | 0 | 57 | 24 | 47 | 2 | 1 | 1 | 11 |
8,585 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link_reference/_list.py
|
azext_nsp.aaz.latest.network.perimeter.link_reference._list.List.NspLinkReferencesList
|
class NspLinkReferencesList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_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(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.description = AAZStrType(
flags={"read_only": True},
)
properties.local_inbound_profiles = AAZListType(
serialized_name="localInboundProfiles",
)
properties.local_outbound_profiles = AAZListType(
serialized_name="localOutboundProfiles",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.remote_inbound_profiles = AAZListType(
serialized_name="remoteInboundProfiles",
flags={"read_only": True},
)
properties.remote_outbound_profiles = AAZListType(
serialized_name="remoteOutboundProfiles",
flags={"read_only": True},
)
properties.remote_perimeter_guid = AAZStrType(
serialized_name="remotePerimeterGuid",
flags={"read_only": True},
)
properties.remote_perimeter_location = AAZStrType(
serialized_name="remotePerimeterLocation",
flags={"read_only": True},
)
properties.remote_perimeter_resource_id = AAZStrType(
serialized_name="remotePerimeterResourceId",
flags={"read_only": True},
)
properties.status = AAZStrType()
local_inbound_profiles = cls._schema_on_200.value.Element.properties.local_inbound_profiles
local_inbound_profiles.Element = AAZStrType()
local_outbound_profiles = cls._schema_on_200.value.Element.properties.local_outbound_profiles
local_outbound_profiles.Element = AAZStrType()
remote_inbound_profiles = cls._schema_on_200.value.Element.properties.remote_inbound_profiles
remote_inbound_profiles.Element = AAZStrType()
remote_outbound_profiles = cls._schema_on_200.value.Element.properties.remote_outbound_profiles
remote_outbound_profiles.Element = AAZStrType()
return cls._schema_on_200
|
class NspLinkReferencesList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 16 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 160 | 21 | 139 | 33 | 122 | 0 | 62 | 26 | 52 | 2 | 1 | 1 | 11 |
8,586 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link_reference/_delete.py
|
azext_nsp.aaz.latest.network.perimeter.link_reference._delete.Delete.NspLinkReferencesDelete
|
class NspLinkReferencesDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/linkReferences/{linkReferenceName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkReferenceName", self.ctx.args.link_reference_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class NspLinkReferencesDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,587 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_wait.py
|
azext_nsp.aaz.latest.network.perimeter.link._wait.Wait.NspLinksGet
|
class NspLinksGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkName", self.ctx.args.link_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_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.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.auto_approved_remote_perimeter_resource_id = AAZStrType(
serialized_name="autoApprovedRemotePerimeterResourceId",
)
properties.description = AAZStrType()
properties.local_inbound_profiles = AAZListType(
serialized_name="localInboundProfiles",
)
properties.local_outbound_profiles = AAZListType(
serialized_name="localOutboundProfiles",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.remote_inbound_profiles = AAZListType(
serialized_name="remoteInboundProfiles",
)
properties.remote_outbound_profiles = AAZListType(
serialized_name="remoteOutboundProfiles",
flags={"read_only": True},
)
properties.remote_perimeter_guid = AAZStrType(
serialized_name="remotePerimeterGuid",
flags={"read_only": True},
)
properties.remote_perimeter_location = AAZStrType(
serialized_name="remotePerimeterLocation",
flags={"read_only": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
local_inbound_profiles = cls._schema_on_200.properties.local_inbound_profiles
local_inbound_profiles.Element = AAZStrType()
local_outbound_profiles = cls._schema_on_200.properties.local_outbound_profiles
local_outbound_profiles.Element = AAZStrType()
remote_inbound_profiles = cls._schema_on_200.properties.remote_inbound_profiles
remote_inbound_profiles.Element = AAZStrType()
remote_outbound_profiles = cls._schema_on_200.properties.remote_outbound_profiles
remote_outbound_profiles.Element = AAZStrType()
return cls._schema_on_200
|
class NspLinksGet(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 | 57 | 24 | 47 | 2 | 1 | 1 | 11 |
8,588 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_update.py
|
azext_nsp.aaz.latest.network.perimeter.link._update.Update.NspLinksGet
|
class NspLinksGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkName", self.ctx.args.link_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_nsp_link_read(cls._schema_on_200)
return cls._schema_on_200
|
class NspLinksGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,589 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_update.py
|
azext_nsp.aaz.latest.network.perimeter.link._update.Update.NspLinksCreateOrUpdate
|
class NspLinksCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkName", self.ctx.args.link_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nsp_link_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class NspLinksCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
8,590 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_update.py
|
azext_nsp.aaz.latest.network.perimeter.link._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)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("localInboundProfiles",
AAZListType, ".local_inbound_profile")
properties.set_prop("remoteInboundProfiles",
AAZListType, ".remote_inbound_profile")
local_inbound_profiles = _builder.get(
".properties.localInboundProfiles")
if local_inbound_profiles is not None:
local_inbound_profiles.set_elements(AAZStrType, ".")
remote_inbound_profiles = _builder.get(
".properties.remoteInboundProfiles")
if remote_inbound_profiles is not None:
remote_inbound_profiles.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 13 | 2 | 11 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 28 | 6 | 22 | 7 | 19 | 0 | 18 | 7 | 15 | 4 | 1 | 1 | 5 |
8,591 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_list.py
|
azext_nsp.aaz.latest.network.perimeter.link._list.List.NspLinksList
|
class NspLinksList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_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(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.auto_approved_remote_perimeter_resource_id = AAZStrType(
serialized_name="autoApprovedRemotePerimeterResourceId",
)
properties.description = AAZStrType()
properties.local_inbound_profiles = AAZListType(
serialized_name="localInboundProfiles",
)
properties.local_outbound_profiles = AAZListType(
serialized_name="localOutboundProfiles",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.remote_inbound_profiles = AAZListType(
serialized_name="remoteInboundProfiles",
)
properties.remote_outbound_profiles = AAZListType(
serialized_name="remoteOutboundProfiles",
flags={"read_only": True},
)
properties.remote_perimeter_guid = AAZStrType(
serialized_name="remotePerimeterGuid",
flags={"read_only": True},
)
properties.remote_perimeter_location = AAZStrType(
serialized_name="remotePerimeterLocation",
flags={"read_only": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
local_inbound_profiles = cls._schema_on_200.value.Element.properties.local_inbound_profiles
local_inbound_profiles.Element = AAZStrType()
local_outbound_profiles = cls._schema_on_200.value.Element.properties.local_outbound_profiles
local_outbound_profiles.Element = AAZStrType()
remote_inbound_profiles = cls._schema_on_200.value.Element.properties.remote_inbound_profiles
remote_inbound_profiles.Element = AAZStrType()
remote_outbound_profiles = cls._schema_on_200.value.Element.properties.remote_outbound_profiles
remote_outbound_profiles.Element = AAZStrType()
return cls._schema_on_200
|
class NspLinksList(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 | 158 | 21 | 137 | 33 | 120 | 0 | 62 | 26 | 52 | 2 | 1 | 1 | 11 |
8,592 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_delete.py
|
azext_nsp.aaz.latest.network.perimeter.link._delete.Delete.NspLinksDelete
|
class NspLinksDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkName", self.ctx.args.link_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class NspLinksDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,593 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_create.py
|
azext_nsp.aaz.latest.network.perimeter.link._create.Create.NspLinksCreateOrUpdate
|
class NspLinksCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/links/{linkName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"linkName", self.ctx.args.link_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"autoApprovedRemotePerimeterResourceId", AAZStrType, ".auto_remote_nsp_id")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("localInboundProfiles",
AAZListType, ".local_inbound_profile")
properties.set_prop("remoteInboundProfiles",
AAZListType, ".remote_inbound_profile")
local_inbound_profiles = _builder.get(
".properties.localInboundProfiles")
if local_inbound_profiles is not None:
local_inbound_profiles.set_elements(AAZStrType, ".")
remote_inbound_profiles = _builder.get(
".properties.remoteInboundProfiles")
if remote_inbound_profiles is not None:
remote_inbound_profiles.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.auto_approved_remote_perimeter_resource_id = AAZStrType(
serialized_name="autoApprovedRemotePerimeterResourceId",
)
properties.description = AAZStrType()
properties.local_inbound_profiles = AAZListType(
serialized_name="localInboundProfiles",
)
properties.local_outbound_profiles = AAZListType(
serialized_name="localOutboundProfiles",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.remote_inbound_profiles = AAZListType(
serialized_name="remoteInboundProfiles",
)
properties.remote_outbound_profiles = AAZListType(
serialized_name="remoteOutboundProfiles",
flags={"read_only": True},
)
properties.remote_perimeter_guid = AAZStrType(
serialized_name="remotePerimeterGuid",
flags={"read_only": True},
)
properties.remote_perimeter_location = AAZStrType(
serialized_name="remotePerimeterLocation",
flags={"read_only": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
local_inbound_profiles = cls._schema_on_200_201.properties.local_inbound_profiles
local_inbound_profiles.Element = AAZStrType()
local_outbound_profiles = cls._schema_on_200_201.properties.local_outbound_profiles
local_outbound_profiles.Element = AAZStrType()
remote_inbound_profiles = cls._schema_on_200_201.properties.remote_inbound_profiles
remote_inbound_profiles.Element = AAZStrType()
remote_outbound_profiles = cls._schema_on_200_201.properties.remote_outbound_profiles
remote_outbound_profiles.Element = AAZStrType()
return cls._schema_on_200_201
|
class NspLinksCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 15 | 1 | 14 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 176 | 24 | 152 | 37 | 133 | 0 | 73 | 29 | 62 | 4 | 1 | 1 | 15 |
8,594 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_wait.py
|
azext_nsp.aaz.latest.network.perimeter.association._wait.Wait.NspAssociationsGet
|
class NspAssociationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.access_mode = AAZStrType(
serialized_name="accessMode",
)
properties.has_provisioning_issues = AAZStrType(
serialized_name="hasProvisioningIssues",
flags={"read_only": True},
)
properties.private_link_resource = AAZObjectType(
serialized_name="privateLinkResource",
)
_WaitHelper._build_schema_sub_resource_read(
properties.private_link_resource)
properties.profile = AAZObjectType()
_WaitHelper._build_schema_sub_resource_read(properties.profile)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NspAssociationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 119 | 16 | 103 | 28 | 86 | 0 | 49 | 21 | 39 | 2 | 1 | 1 | 11 |
8,595 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_update.py
|
azext_nsp.aaz.latest.network.perimeter.association._update.Update.NspAssociationsGet
|
class NspAssociationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_nsp_association_read(
cls._schema_on_200)
return cls._schema_on_200
|
class NspAssociationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,596 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_update.py
|
azext_nsp.aaz.latest.network.perimeter.association._update.Update.NspAssociationsCreateOrUpdate
|
class NspAssociationsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"associationName", self.ctx.args.association_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_nsp_association_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class NspAssociationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
8,597 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/association/_update.py
|
azext_nsp.aaz.latest.network.perimeter.association._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("location", AAZStrType, ".location")
_builder.set_prop("name", AAZStrType, ".association_name")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("accessMode", AAZStrType, ".access_mode")
_UpdateHelper._build_schema_sub_resource_update(properties.set_prop(
"privateLinkResource", AAZObjectType, ".private_link_resource"))
_UpdateHelper._build_schema_sub_resource_update(
properties.set_prop("profile", AAZObjectType, ".profile"))
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 | 12 | 2 | 11 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 27 | 5 | 22 | 6 | 19 | 0 | 18 | 6 | 15 | 3 | 1 | 1 | 4 |
8,598 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/logging_configuration/_update.py
|
azext_nsp.aaz.latest.network.perimeter.logging_configuration._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)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("enabledLogCategories",
AAZListType, ".enabled_log_categories")
properties.set_prop("version", AAZStrType, ".version")
enabled_log_categories = _builder.get(
".properties.enabledLogCategories")
if enabled_log_categories is not None:
enabled_log_categories.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 10 | 2 | 9 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 23 | 5 | 18 | 6 | 15 | 0 | 14 | 6 | 11 | 3 | 1 | 1 | 4 |
8,599 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/nsp/azext_nsp/aaz/latest/network/perimeter/logging_configuration/_update.py
|
azext_nsp.aaz.latest.network.perimeter.logging_configuration._update.Update.NspLoggingConfigurationCreateOrUpdate
|
class NspLoggingConfigurationCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/loggingConfigurations/{loggingConfigurationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"loggingConfigurationName", self.ctx.args.logging_configuration_name,
required=True,
),
**self.serialize_url_param(
"networkSecurityPerimeterName", self.ctx.args.perimeter_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200(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_nsp_logging_configuration_read(
cls._schema_on_200)
return cls._schema_on_200
|
class NspLoggingConfigurationCreateOrUpdate(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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.