From f629492d4c5d08500addf5c154cd1ae8c00d2efb Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 12:58:48 -0700 Subject: [PATCH 1/6] remove temp autorest workaround --- .../src/CdkHack/ArmAppServiceModelFactory.cs | 3909 ----------------- .../src/CdkHack/TempInternals.cs | 47 - .../src/autorest.md | 1 - 3 files changed, 3957 deletions(-) delete mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs delete mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs deleted file mode 100644 index 730d699df646..000000000000 --- a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs +++ /dev/null @@ -1,3909 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using Azure; -using Azure.Core; -using Azure.ResourceManager.AppService; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.AppService.Models -{ - /// Model factory for models. - public static partial class ArmAppServiceModelFactory - { - /// Initializes a new instance of AppServiceCertificateOrderData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// State of the Key Vault secret. - /// Certificate distinguished name. - /// Domain verification token. - /// Duration in years (must be 1). - /// Certificate key size. - /// Certificate product type. - /// <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. - /// Status of certificate order. - /// Current order status. - /// Signed certificate. - /// Last CSR that was created for this order. - /// Intermediate certificate. - /// Root certificate. - /// Current serial number of the certificate. - /// Certificate last issuance time. - /// Certificate expiration time. - /// <code>true</code> if private key is external; otherwise, <code>false</code>. - /// Reasons why App Service Certificate is not renewable at the current moment. - /// Time stamp when the certificate would be auto renewed next. - /// Contact info. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceCertificateOrderData AppServiceCertificateOrderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = null, int? keySize = null, CertificateProductType? productType = null, bool? isAutoRenew = null, ProvisioningState? provisioningState = null, CertificateOrderStatus? status = null, AppServiceCertificateDetails signedCertificate = null, string csr = null, AppServiceCertificateDetails intermediate = null, AppServiceCertificateDetails root = null, string serialNumber = null, DateTimeOffset? lastCertificateIssuedOn = null, DateTimeOffset? expireOn = null, bool? isPrivateKeyExternal = null, IEnumerable appServiceCertificateNotRenewableReasons = null, DateTimeOffset? nextAutoRenewTimeStamp = null, CertificateOrderContact contact = null, string kind = null) - { - tags ??= new Dictionary(); - certificates ??= new Dictionary(); - appServiceCertificateNotRenewableReasons ??= new List(); - - return new AppServiceCertificateOrderData(id, name, resourceType, systemData, tags, location, certificates, distinguishedName, domainVerificationToken, validityInYears, keySize, productType, isAutoRenew, provisioningState, status, signedCertificate, csr, intermediate, root, serialNumber, lastCertificateIssuedOn, expireOn, isPrivateKeyExternal, appServiceCertificateNotRenewableReasons?.ToList(), nextAutoRenewTimeStamp, contact, kind); - } - - /// Initializes a new instance of AppServiceCertificateProperties. - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// A new instance for mocking. - public static AppServiceCertificateProperties AppServiceCertificateProperties(ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null) - { - return new AppServiceCertificateProperties(keyVaultId, keyVaultSecretName, provisioningState); - } - - /// Initializes a new instance of AppServiceCertificateDetails. - /// Certificate Version. - /// Certificate Serial Number. - /// Certificate Thumbprint. - /// Certificate Subject. - /// Date Certificate is valid from. - /// Date Certificate is valid to. - /// Certificate Signature algorithm. - /// Certificate Issuer. - /// Raw certificate data. - /// A new instance for mocking. - public static AppServiceCertificateDetails AppServiceCertificateDetails(int? version = null, string serialNumber = null, string thumbprintString = null, string subject = null, DateTimeOffset? notBefore = null, DateTimeOffset? notAfter = null, string signatureAlgorithm = null, string issuer = null, string rawData = null) - { - return new AppServiceCertificateDetails(version, serialNumber, thumbprintString, subject, notBefore, notAfter, signatureAlgorithm, issuer, rawData); - } - - /// Initializes a new instance of CertificateOrderContact. - /// - /// - /// - /// - /// A new instance for mocking. - public static CertificateOrderContact CertificateOrderContact(string email = null, string nameFirst = null, string nameLast = null, string phone = null) - { - return new CertificateOrderContact(email, nameFirst, nameLast, phone); - } - - /// Initializes a new instance of AppServiceCertificateOrderPatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// State of the Key Vault secret. - /// Certificate distinguished name. - /// Domain verification token. - /// Duration in years (must be 1). - /// Certificate key size. - /// Certificate product type. - /// <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. - /// Status of certificate order. - /// Current order status. - /// Signed certificate. - /// Last CSR that was created for this order. - /// Intermediate certificate. - /// Root certificate. - /// Current serial number of the certificate. - /// Certificate last issuance time. - /// Certificate expiration time. - /// <code>true</code> if private key is external; otherwise, <code>false</code>. - /// Reasons why App Service Certificate is not renewable at the current moment. - /// Time stamp when the certificate would be auto renewed next. - /// Contact info. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceCertificateOrderPatch AppServiceCertificateOrderPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = null, int? keySize = null, CertificateProductType? productType = null, bool? isAutoRenew = null, ProvisioningState? provisioningState = null, CertificateOrderStatus? status = null, AppServiceCertificateDetails signedCertificate = null, string csr = null, AppServiceCertificateDetails intermediate = null, AppServiceCertificateDetails root = null, string serialNumber = null, DateTimeOffset? lastCertificateIssuanceOn = null, DateTimeOffset? expireOn = null, bool? isPrivateKeyExternal = null, IEnumerable appServiceCertificateNotRenewableReasons = null, DateTimeOffset? nextAutoRenewalTimeStamp = null, CertificateOrderContact contact = null, string kind = null) - { - certificates ??= new Dictionary(); - appServiceCertificateNotRenewableReasons ??= new List(); - - return new AppServiceCertificateOrderPatch(id, name, resourceType, systemData, certificates, distinguishedName, domainVerificationToken, validityInYears, keySize, productType, isAutoRenew, provisioningState, status, signedCertificate, csr, intermediate, root, serialNumber, lastCertificateIssuanceOn, expireOn, isPrivateKeyExternal, appServiceCertificateNotRenewableReasons?.ToList(), nextAutoRenewalTimeStamp, contact, kind); - } - - /// Initializes a new instance of AppServiceCertificateData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceCertificateData AppServiceCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null, string kind = null) - { - tags ??= new Dictionary(); - - return new AppServiceCertificateData(id, name, resourceType, systemData, tags, location, keyVaultId, keyVaultSecretName, provisioningState, kind); - } - - /// Initializes a new instance of AppServiceCertificatePatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceCertificatePatch AppServiceCertificatePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null, string kind = null) - { - return new AppServiceCertificatePatch(id, name, resourceType, systemData, keyVaultId, keyVaultSecretName, provisioningState, kind); - } - - /// Initializes a new instance of ReissueCertificateOrderContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Certificate Key Size. - /// Delay in hours to revoke existing certificate after the new certificate is issued. - /// Csr to be used for re-key operation. - /// Should we change the ASC type (from managed private key to external private key and vice versa). - /// Kind of resource. - /// A new instance for mocking. - public static ReissueCertificateOrderContent ReissueCertificateOrderContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? keySize = null, int? delayExistingRevokeInHours = null, string csr = null, bool? isPrivateKeyExternal = null, string kind = null) - { - return new ReissueCertificateOrderContent(id, name, resourceType, systemData, keySize, delayExistingRevokeInHours, csr, isPrivateKeyExternal, kind); - } - - /// Initializes a new instance of RenewCertificateOrderContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Certificate Key Size. - /// Csr to be used for re-key operation. - /// Should we change the ASC type (from managed private key to external private key and vice versa). - /// Kind of resource. - /// A new instance for mocking. - public static RenewCertificateOrderContent RenewCertificateOrderContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? keySize = null, string csr = null, bool? isPrivateKeyExternal = null, string kind = null) - { - return new RenewCertificateOrderContent(id, name, resourceType, systemData, keySize, csr, isPrivateKeyExternal, kind); - } - - /// Initializes a new instance of SiteSeal. - /// HTML snippet. - /// is null. - /// A new instance for mocking. - public static SiteSeal SiteSeal(string html = null) - { - if (html == null) - { - throw new ArgumentNullException(nameof(html)); - } - - return new SiteSeal(html); - } - - /// Initializes a new instance of CertificateOrderAction. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Action type. - /// Time at which the certificate action was performed. - /// Kind of resource. - /// A new instance for mocking. - public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null, string kind = null) - { - return new CertificateOrderAction(id, name, resourceType, systemData, actionType, createdOn, kind); - } - - /// Initializes a new instance of AppServiceCertificateEmail. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Email id. - /// Time stamp. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null, string kind = null) - { - return new AppServiceCertificateEmail(id, name, resourceType, systemData, emailId, timeStamp, kind); - } - - /// Initializes a new instance of AppServiceDetectorData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// metadata for the detector. - /// Data Set. - /// Indicates status of the most severe insight. - /// Additional configuration for different data providers to be used by the UI. - /// Suggested utterances where the detector can be applicable. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceDetectorData AppServiceDetectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DetectorInfo metadata = null, IEnumerable dataset = null, AppServiceStatusInfo status = null, IEnumerable dataProvidersMetadata = null, QueryUtterancesResults suggestedUtterances = null, string kind = null) - { - dataset ??= new List(); - dataProvidersMetadata ??= new List(); - - return new AppServiceDetectorData(id, name, resourceType, systemData, metadata, dataset?.ToList(), status, dataProvidersMetadata?.ToList(), suggestedUtterances, kind); - } - - /// Initializes a new instance of DetectorInfo. - /// Id of detector. - /// Name of detector. - /// Short description of the detector and its purpose. - /// Author of the detector. - /// Problem category. This serves for organizing group for detectors. - /// List of Support Topics for which this detector is enabled. - /// Analysis Types for which this detector should apply to. - /// Whether this detector is an Analysis Detector or not. - /// Defines score of a detector to power ML based matching. - /// A new instance for mocking. - public static DetectorInfo DetectorInfo(string id = null, string name = null, string description = null, string author = null, string category = null, IEnumerable supportTopicList = null, IEnumerable analysisType = null, DetectorType? detectorType = null, float? score = null) - { - supportTopicList ??= new List(); - analysisType ??= new List(); - - return new DetectorInfo(id, name, description, author, category, supportTopicList?.ToList(), analysisType?.ToList(), detectorType, score); - } - - /// Initializes a new instance of DetectorSupportTopic. - /// Support Topic Id. - /// Unique resource Id. - /// A new instance for mocking. - public static DetectorSupportTopic DetectorSupportTopic(string id = null, ResourceIdentifier pesId = null) - { - return new DetectorSupportTopic(id, pesId); - } - - /// Initializes a new instance of DataProviderMetadata. - /// - /// Settings for the data provider. - /// A new instance for mocking. - public static DataProviderMetadata DataProviderMetadata(string providerName = null, IEnumerable propertyBag = null) - { - propertyBag ??= new List(); - - return new DataProviderMetadata(providerName, propertyBag?.ToList()); - } - - /// Initializes a new instance of DataProviderKeyValuePair. - /// - /// Any object. - /// A new instance for mocking. - public static DataProviderKeyValuePair DataProviderKeyValuePair(string key = null, BinaryData value = null) - { - return new DataProviderKeyValuePair(key, value); - } - - /// Initializes a new instance of CsmOperationDisplay. - /// - /// - /// - /// - /// A new instance for mocking. - public static CsmOperationDisplay CsmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) - { - return new CsmOperationDisplay(provider, resource, operation, description); - } - - /// Initializes a new instance of ServiceSpecification. - /// - /// - /// A new instance for mocking. - public static ServiceSpecification ServiceSpecification(IEnumerable metricSpecifications = null, IEnumerable logSpecifications = null) - { - metricSpecifications ??= new List(); - logSpecifications ??= new List(); - - return new ServiceSpecification(metricSpecifications?.ToList(), logSpecifications?.ToList()); - } - - /// Initializes a new instance of MetricSpecification. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MetricSpecification MetricSpecification(string name = null, string displayName = null, string displayDescription = null, string unit = null, string aggregationType = null, bool? isInstanceLevelAggregationSupported = null, bool? isRegionalMdmAccountEnabled = null, string sourceMdmAccount = null, string sourceMdmNamespace = null, string metricFilterPattern = null, bool? fillGapWithZero = null, bool? isInternal = null, IEnumerable dimensions = null, string category = null, IEnumerable availabilities = null, IEnumerable supportedTimeGrainTypes = null, IEnumerable supportedAggregationTypes = null) - { - dimensions ??= new List(); - availabilities ??= new List(); - supportedTimeGrainTypes ??= new List(); - supportedAggregationTypes ??= new List(); - - return new MetricSpecification(name, displayName, displayDescription, unit, aggregationType, isInstanceLevelAggregationSupported, isRegionalMdmAccountEnabled, sourceMdmAccount, sourceMdmNamespace, metricFilterPattern, fillGapWithZero, isInternal, dimensions?.ToList(), category, availabilities?.ToList(), supportedTimeGrainTypes?.ToList(), supportedAggregationTypes?.ToList()); - } - - /// Initializes a new instance of MetricDimension. - /// - /// - /// - /// - /// A new instance for mocking. - public static MetricDimension MetricDimension(string name = null, string displayName = null, string internalName = null, bool? isToBeExportedForShoebox = null) - { - return new MetricDimension(name, displayName, internalName, isToBeExportedForShoebox); - } - - /// Initializes a new instance of MetricAvailability. - /// - /// - /// A new instance for mocking. - public static MetricAvailability MetricAvailability(string timeGrain = null, TimeSpan? blobDuration = null) - { - return new MetricAvailability(timeGrain, blobDuration); - } - - /// Initializes a new instance of LogSpecification. - /// - /// - /// - /// - /// A new instance for mocking. - public static LogSpecification LogSpecification(string name = null, string displayName = null, TimeSpan? blobDuration = null, string logFilterPattern = null) - { - return new LogSpecification(name, displayName, blobDuration, logFilterPattern); - } - - /// Initializes a new instance of DomainAvailabilityCheckResult. - /// Name of the domain. - /// <code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>. - /// Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything. - /// A new instance for mocking. - public static DomainAvailabilityCheckResult DomainAvailabilityCheckResult(string name = null, bool? isAvailable = null, AppServiceDomainType? domainType = null) - { - return new DomainAvailabilityCheckResult(name, isAvailable, domainType); - } - - /// Initializes a new instance of AppServiceDomainData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Administrative contact. - /// Billing contact. - /// Registrant contact. - /// Technical contact. - /// Domain registration status. - /// Domain provisioning state. - /// Name servers. - /// <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. - /// Domain creation timestamp. - /// Domain expiration timestamp. - /// Timestamp when the domain was renewed last time. - /// <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. - /// - /// <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and - /// it is hosted on name servers Azure has programmatic access to. - /// - /// All hostnames derived from the domain and assigned to Azure resources. - /// Legal agreement consent. - /// Reasons why domain is not renewable. - /// Current DNS type. - /// Azure DNS Zone to use. - /// Target DNS type (would be used for migration). - /// - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceDomainData AppServiceDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RegistrationContactInfo contactAdmin = null, RegistrationContactInfo contactBilling = null, RegistrationContactInfo contactRegistrant = null, RegistrationContactInfo contactTech = null, AppServiceDomainStatus? registrationStatus = null, ProvisioningState? provisioningState = null, IEnumerable nameServers = null, bool? isDomainPrivacyEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, DateTimeOffset? lastRenewedOn = null, bool? isAutoRenew = null, bool? isDnsRecordManagementReady = null, IEnumerable managedHostNames = null, DomainPurchaseConsent consent = null, IEnumerable domainNotRenewableReasons = null, AppServiceDnsType? dnsType = null, string dnsZoneId = null, AppServiceDnsType? targetDnsType = null, string authCode = null, string kind = null) - { - tags ??= new Dictionary(); - nameServers ??= new List(); - managedHostNames ??= new List(); - domainNotRenewableReasons ??= new List(); - - return new AppServiceDomainData(id, name, resourceType, systemData, tags, location, contactAdmin, contactBilling, contactRegistrant, contactTech, registrationStatus, provisioningState, nameServers?.ToList(), isDomainPrivacyEnabled, createdOn, expireOn, lastRenewedOn, isAutoRenew, isDnsRecordManagementReady, managedHostNames?.ToList(), consent, domainNotRenewableReasons?.ToList(), dnsType, dnsZoneId, targetDnsType, authCode, kind); - } - - /// Initializes a new instance of AppServiceHostName. - /// Name of the hostname. - /// List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager. - /// Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. - /// Type of the Azure resource the hostname is assigned to. - /// Type of the DNS record. - /// Type of the hostname. - /// A new instance for mocking. - public static AppServiceHostName AppServiceHostName(string name = null, IEnumerable siteNames = null, string azureResourceName = null, AppServiceResourceType? azureResourceType = null, CustomHostNameDnsRecordType? customHostNameDnsRecordType = null, AppServiceHostNameType? hostNameType = null) - { - siteNames ??= new List(); - - return new AppServiceHostName(name, siteNames?.ToList(), azureResourceName, azureResourceType, customHostNameDnsRecordType, hostNameType); - } - - /// Initializes a new instance of DomainControlCenterSsoRequestInfo. - /// URL where the single sign-on request is to be made. - /// Post parameter key. - /// Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. - /// A new instance for mocking. - public static DomainControlCenterSsoRequestInfo DomainControlCenterSsoRequestInfo(Uri uri = null, string postParameterKey = null, string postParameterValue = null) - { - return new DomainControlCenterSsoRequestInfo(uri, postParameterKey, postParameterValue); - } - - /// Initializes a new instance of AppServiceDomainPatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Administrative contact. - /// Billing contact. - /// Registrant contact. - /// Technical contact. - /// Domain registration status. - /// Domain provisioning state. - /// Name servers. - /// <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. - /// Domain creation timestamp. - /// Domain expiration timestamp. - /// Timestamp when the domain was renewed last time. - /// <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. - /// - /// <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and - /// it is hosted on name servers Azure has programmatic access to. - /// - /// All hostnames derived from the domain and assigned to Azure resources. - /// Legal agreement consent. - /// Reasons why domain is not renewable. - /// Current DNS type. - /// Azure DNS Zone to use. - /// Target DNS type (would be used for migration). - /// - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceDomainPatch AppServiceDomainPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RegistrationContactInfo contactAdmin = null, RegistrationContactInfo contactBilling = null, RegistrationContactInfo contactRegistrant = null, RegistrationContactInfo contactTech = null, AppServiceDomainStatus? registrationStatus = null, ProvisioningState? provisioningState = null, IEnumerable nameServers = null, bool? isDomainPrivacyEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, DateTimeOffset? lastRenewedOn = null, bool? isAutoRenew = null, bool? isReadyForDnsRecordManagement = null, IEnumerable managedHostNames = null, DomainPurchaseConsent consent = null, IEnumerable domainNotRenewableReasons = null, AppServiceDnsType? dnsType = null, string dnsZoneId = null, AppServiceDnsType? targetDnsType = null, string authCode = null, string kind = null) - { - nameServers ??= new List(); - managedHostNames ??= new List(); - domainNotRenewableReasons ??= new List(); - - return new AppServiceDomainPatch(id, name, resourceType, systemData, contactAdmin, contactBilling, contactRegistrant, contactTech, registrationStatus, provisioningState, nameServers?.ToList(), isDomainPrivacyEnabled, createdOn, expireOn, lastRenewedOn, isAutoRenew, isReadyForDnsRecordManagement, managedHostNames?.ToList(), consent, domainNotRenewableReasons?.ToList(), dnsType, dnsZoneId, targetDnsType, authCode, kind); - } - - /// Initializes a new instance of DomainOwnershipIdentifierData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Ownership Id. - /// Kind of resource. - /// A new instance for mocking. - public static DomainOwnershipIdentifierData DomainOwnershipIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ownershipId = null, string kind = null) - { - return new DomainOwnershipIdentifierData(id, name, resourceType, systemData, ownershipId, kind); - } - - /// Initializes a new instance of TopLevelDomainData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// If <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>. - /// Kind of resource. - /// A new instance for mocking. - public static TopLevelDomainData TopLevelDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isDomainPrivacySupported = null, string kind = null) - { - return new TopLevelDomainData(id, name, resourceType, systemData, isDomainPrivacySupported, kind); - } - - /// Initializes a new instance of TldLegalAgreement. - /// Unique identifier for the agreement. - /// Agreement title. - /// Agreement details. - /// URL where a copy of the agreement details is hosted. - /// A new instance for mocking. - public static TldLegalAgreement TldLegalAgreement(string agreementKey = null, string title = null, string content = null, Uri uri = null) - { - return new TldLegalAgreement(agreementKey, title, content, uri); - } - - /// Initializes a new instance of AppServiceEnvironmentData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Provisioning state of the App Service Environment. - /// Current status of the App Service Environment. - /// Description of the Virtual Network. - /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. - /// Front-end VM size, e.g. "Medium", "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved for the App Service Environment. - /// DNS suffix of the App Service Environment. - /// Maximum number of VMs in the App Service Environment. - /// Scale factor for front-ends. - /// - /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - /// Custom settings for changing the behavior of the App Service Environment. - /// User added ip ranges to whitelist on ASE db. - /// Flag that displays whether an ASE has linux workers or not. - /// Dedicated Host Count. - /// Whether or not this App Service Environment is zone-redundant. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) - { - tags ??= new Dictionary(); - clusterSettings ??= new List(); - userWhitelistedIPRanges ??= new List(); - - return new AppServiceEnvironmentData(id, name, resourceType, systemData, tags, location, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind); - } - - /// Initializes a new instance of AppServiceEnvironmentProperties. - /// Provisioning state of the App Service Environment. - /// Current status of the App Service Environment. - /// Description of the Virtual Network. - /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. - /// Front-end VM size, e.g. "Medium", "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved for the App Service Environment. - /// DNS suffix of the App Service Environment. - /// Maximum number of VMs in the App Service Environment. - /// Scale factor for front-ends. - /// - /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - /// Custom settings for changing the behavior of the App Service Environment. - /// User added ip ranges to whitelist on ASE db. - /// Flag that displays whether an ASE has linux workers or not. - /// Dedicated Host Count. - /// Whether or not this App Service Environment is zone-redundant. - /// A new instance for mocking. - public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null) - { - clusterSettings ??= new List(); - userWhitelistedIPRanges ??= new List(); - - return new AppServiceEnvironmentProperties(provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant); - } - - /// Initializes a new instance of AppServiceVirtualNetworkProfile. - /// Resource id of the Virtual Network. - /// Name of the Virtual Network (read-only). - /// Resource type of the Virtual Network (read-only). - /// Subnet within the Virtual Network. - /// A new instance for mocking. - public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string subnet = null) - { - return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet); - } - - /// Initializes a new instance of AppServiceEnvironmentPatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Provisioning state of the App Service Environment. - /// Current status of the App Service Environment. - /// Description of the Virtual Network. - /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. - /// Front-end VM size, e.g. "Medium", "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved for the App Service Environment. - /// DNS suffix of the App Service Environment. - /// Maximum number of VMs in the App Service Environment. - /// Scale factor for front-ends. - /// - /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// - /// Custom settings for changing the behavior of the App Service Environment. - /// User added ip ranges to whitelist on ASE db. - /// Flag that displays whether an ASE has linux workers or not. - /// Dedicated Host Count. - /// Whether or not this App Service Environment is zone-redundant. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) - { - clusterSettings ??= new List(); - userWhitelistedIPRanges ??= new List(); - - return new AppServiceEnvironmentPatch(id, name, resourceType, systemData, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind); - } - - /// Initializes a new instance of StampCapacity. - /// Name of the stamp. - /// Available capacity (# of machines, bytes of storage etc...). - /// Total capacity (# of machines, bytes of storage etc...). - /// Name of the unit. - /// Shared/dedicated workers. - /// Size of the machines. - /// - /// Size ID of machines: - /// 0 - Small - /// 1 - Medium - /// 2 - Large - /// - /// - /// If <code>true</code>, it includes basic apps. - /// Basic apps are not used for capacity allocation. - /// - /// <code>true</code> if capacity is applicable for all apps; otherwise, <code>false</code>. - /// Shared or Dedicated. - /// Is this a linux stamp capacity. - /// A new instance for mocking. - public static StampCapacity StampCapacity(string name = null, long? availableCapacity = null, long? totalCapacity = null, string unit = null, ComputeModeOption? computeMode = null, WorkerSizeOption? workerSize = null, int? workerSizeId = null, bool? excludeFromCapacityAllocation = null, bool? isApplicableForAllComputeModes = null, string siteMode = null, bool? isLinux = null) - { - return new StampCapacity(name, availableCapacity, totalCapacity, unit, computeMode, workerSize, workerSizeId, excludeFromCapacityAllocation, isApplicableForAllComputeModes, siteMode, isLinux); - } - - /// Initializes a new instance of AppServiceEnvironmentAddressResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Main public virtual IP. - /// Virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. - /// IP addresses appearing on outbound connections. - /// Additional virtual IPs. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IPAddress serviceIPAddress = null, IPAddress internalIPAddress = null, IEnumerable outboundIPAddresses = null, IEnumerable virtualIPMappings = null, string kind = null) - { - outboundIPAddresses ??= new List(); - virtualIPMappings ??= new List(); - - return new AppServiceEnvironmentAddressResult(id, name, resourceType, systemData, serviceIPAddress, internalIPAddress, outboundIPAddresses?.ToList(), virtualIPMappings?.ToList(), kind); - } - - /// Initializes a new instance of AseV3NetworkingConfigurationData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// - /// - /// - /// Property to enable and disable new private endpoint connection creation on ASE. - /// Kind of resource. - /// A new instance for mocking. - public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, string kind = null) - { - windowsOutboundIPAddresses ??= new List(); - linuxOutboundIPAddresses ??= new List(); - externalInboundIPAddresses ??= new List(); - internalInboundIPAddresses ??= new List(); - - return new AseV3NetworkingConfigurationData(id, name, resourceType, systemData, windowsOutboundIPAddresses?.ToList(), linuxOutboundIPAddresses?.ToList(), externalInboundIPAddresses?.ToList(), internalInboundIPAddresses?.ToList(), allowNewPrivateEndpointConnections, kind); - } - - /// Initializes a new instance of HostingEnvironmentDiagnostics. - /// Name/identifier of the diagnostics. - /// Diagnostics output. - /// A new instance for mocking. - public static HostingEnvironmentDiagnostics HostingEnvironmentDiagnostics(string name = null, string diagnosticsOutput = null) - { - return new HostingEnvironmentDiagnostics(name, diagnosticsOutput); - } - - /// Initializes a new instance of InboundEnvironmentEndpoint. - /// Short text describing the purpose of the network traffic. - /// The IP addresses that network traffic will originate from in cidr notation. - /// The ports that network traffic will arrive to the App Service Environment at. - /// A new instance for mocking. - public static InboundEnvironmentEndpoint InboundEnvironmentEndpoint(string description = null, IEnumerable endpoints = null, IEnumerable ports = null) - { - endpoints ??= new List(); - ports ??= new List(); - - return new InboundEnvironmentEndpoint(description, endpoints?.ToList(), ports?.ToList()); - } - - /// Initializes a new instance of AppServiceWorkerPoolData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Description of a SKU for a scalable resource. - /// Worker size ID for referencing this worker pool. - /// Shared or dedicated app hosting. - /// VM size of the worker pool instances. - /// Number of instances in the worker pool. - /// Names of all instances in the worker pool (read only). - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceWorkerPoolData AppServiceWorkerPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServiceSkuDescription sku = null, int? workerSizeId = null, ComputeModeOption? computeMode = null, string workerSize = null, int? workerCount = null, IEnumerable instanceNames = null, string kind = null) - { - instanceNames ??= new List(); - - return new AppServiceWorkerPoolData(id, name, resourceType, systemData, sku, workerSizeId, computeMode, workerSize, workerCount, instanceNames?.ToList(), kind); - } - - /// Initializes a new instance of ResourceMetricDefinition. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Unit of the metric. - /// Primary aggregation type. - /// List of time grains supported for the metric together with retention period. - /// Resource URI. - /// Resource metric definition properties. - /// Kind of resource. - /// A new instance for mocking. - public static ResourceMetricDefinition ResourceMetricDefinition(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string unit = null, string primaryAggregationType = null, IEnumerable metricAvailabilities = null, Uri resourceUri = null, IReadOnlyDictionary properties = null, string kind = null) - { - metricAvailabilities ??= new List(); - properties ??= new Dictionary(); - - return new ResourceMetricDefinition(id, name, resourceType, systemData, unit, primaryAggregationType, metricAvailabilities?.ToList(), resourceUri, properties, kind); - } - - /// Initializes a new instance of ResourceMetricAvailability. - /// Time grain . - /// Retention period for the current time grain. - /// A new instance for mocking. - public static ResourceMetricAvailability ResourceMetricAvailability(string timeGrain = null, string retention = null) - { - return new ResourceMetricAvailability(timeGrain, retention); - } - - /// Initializes a new instance of AppServicePoolSkuInfo. - /// Resource type that this SKU applies to. - /// Name and tier of the SKU. - /// Min, max, and default scale values of the SKU. - /// A new instance for mocking. - public static AppServicePoolSkuInfo AppServicePoolSkuInfo(ResourceType? resourceType = null, AppServiceSkuDescription sku = null, AppServiceSkuCapacity capacity = null) - { - return new AppServicePoolSkuInfo(resourceType, sku, capacity); - } - - /// Initializes a new instance of AppServiceUsage. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Friendly name shown in the UI. - /// Name of the quota resource. - /// Units of measurement for the quota resource. - /// The current value of the resource counter. - /// The resource limit. - /// Next reset time for the resource counter. - /// Compute mode used for this usage. - /// Site mode used for this usage. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceUsage AppServiceUsage(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string resourceName = null, string unit = null, long? currentValue = null, long? limit = null, DateTimeOffset? nextResetOn = null, ComputeModeOption? computeMode = null, string siteMode = null, string kind = null) - { - return new AppServiceUsage(id, name, resourceType, systemData, displayName, resourceName, unit, currentValue, limit, nextResetOn, computeMode, siteMode, kind); - } - - /// Initializes a new instance of AppServiceOperation. - /// Operation ID. - /// Operation name. - /// The current status of the operation. - /// Any errors associate with the operation. - /// Time when operation has started. - /// Time when operation has been updated. - /// Time when operation will expire. - /// Applicable only for stamp operation ids. - /// A new instance for mocking. - public static AppServiceOperation AppServiceOperation(string id = null, string name = null, AppServiceOperationStatus? status = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? expireOn = null, Guid? geoMasterOperationId = null) - { - errors ??= new List(); - - return new AppServiceOperation(id, name, status, errors?.ToList(), createdOn, modifiedOn, expireOn, geoMasterOperationId); - } - - /// Initializes a new instance of OutboundEnvironmentEndpoint. - /// The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. - /// The endpoints that the App Service Environment reaches the service at. - /// A new instance for mocking. - public static OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) - { - endpoints ??= new List(); - - return new OutboundEnvironmentEndpoint(category, endpoints?.ToList()); - } - - /// Initializes a new instance of AppServiceEndpointDependency. - /// The domain name of the dependency. - /// The IP Addresses and Ports used when connecting to DomainName. - /// A new instance for mocking. - public static AppServiceEndpointDependency AppServiceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) - { - endpointDetails ??= new List(); - - return new AppServiceEndpointDependency(domainName, endpointDetails?.ToList()); - } - - /// Initializes a new instance of AppServiceEndpointDetail. - /// An IP Address that Domain Name currently resolves to. - /// The port an endpoint is connected to. - /// The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. - /// Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. - /// A new instance for mocking. - public static AppServiceEndpointDetail AppServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, double? latency = null, bool? isAccessible = null) - { - return new AppServiceEndpointDetail(ipAddress, port, latency, isAccessible); - } - - /// Initializes a new instance of RemotePrivateEndpointConnectionARMResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// PrivateEndpoint of a remote private endpoint connection. - /// The state of a private link connection. - /// Private IPAddresses mapped to the remote private endpoint. - /// Kind of resource. - /// A new instance for mocking. - public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpointConnectionARMResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null) - { - ipAddresses ??= new List(); - - return new RemotePrivateEndpointConnectionARMResourceData(id, name, resourceType, systemData, provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, privateLinkServiceConnectionState, ipAddresses?.ToList(), kind); - } - - /// Initializes a new instance of PrivateLinkConnectionApprovalRequestInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The state of a private link connection. - /// Kind of resource. - /// A new instance for mocking. - public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) - { - return new PrivateLinkConnectionApprovalRequestInfo(id, name, resourceType, systemData, privateLinkServiceConnectionState, kind); - } - - /// Initializes a new instance of AppServicePrivateLinkResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Properties of a private link resource. - /// A new instance for mocking. - public static AppServicePrivateLinkResourceData AppServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServicePrivateLinkResourceProperties properties = null) - { - return new AppServicePrivateLinkResourceData(id, name, resourceType, systemData, properties); - } - - /// Initializes a new instance of AppServicePrivateLinkResourceProperties. - /// GroupId of a private link resource. - /// RequiredMembers of a private link resource. - /// RequiredZoneNames of a private link resource. - /// A new instance for mocking. - public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResourceProperties(string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) - { - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); - - return new AppServicePrivateLinkResourceProperties(groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); - } - - /// Initializes a new instance of AppServicePlanData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Description of a SKU for a scalable resource. - /// Extended Location. - /// Target worker tier assigned to the App Service plan. - /// App Service plan status. - /// App Service plan subscription. - /// Specification for the App Service Environment to use for the App Service plan. - /// Maximum number of instances that can be assigned to this App Service plan. - /// Geographical location for the App Service plan. - /// - /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. - /// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. - /// - /// ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku. - /// Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. - /// Number of apps assigned to this App Service plan. - /// If <code>true</code>, this App Service Plan owns spot instances. - /// The time when the server farm expires. Valid only if it is a spot server farm. - /// The time when the server farm free offer expires. - /// Resource group of the App Service plan. - /// If Linux app service plan <code>true</code>, <code>false</code> otherwise. - /// Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. - /// If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. - /// Scaling worker count. - /// Scaling worker size ID. - /// Provisioning state of the App Service Plan. - /// Specification for the Kubernetes Environment to use for the App Service plan. - /// - /// If <code>true</code>, this App Service Plan will perform availability zone balancing. - /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. - /// - /// Kind of resource. - /// A new instance for mocking. - public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) - { - tags ??= new Dictionary(); - - return new AppServicePlanData(id, name, resourceType, systemData, tags, location, sku, extendedLocation, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpireOn, freeOfferExpireOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind); - } - - /// Initializes a new instance of HostingEnvironmentProfile. - /// Resource ID of the App Service Environment. - /// Name of the App Service Environment. - /// Resource type of the App Service Environment. - /// A new instance for mocking. - public static HostingEnvironmentProfile HostingEnvironmentProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) - { - return new HostingEnvironmentProfile(id, name, resourceType); - } - - /// Initializes a new instance of KubeEnvironmentProfile. - /// Resource ID of the Kubernetes Environment. - /// Name of the Kubernetes Environment. - /// Resource type of the Kubernetes Environment. - /// A new instance for mocking. - public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) - { - return new KubeEnvironmentProfile(id, name, resourceType); - } - - /// Initializes a new instance of WebSiteData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed service identity. - /// Extended Location. - /// Current state of the app. - /// Hostnames associated with the app. - /// Name of the repository site. - /// State indicating whether the app has exceeded its quota usage. Read-only. - /// <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). - /// - /// Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, - /// the app is not served on those hostnames. - /// - /// Management information availability state for the app. - /// Hostname SSL states are used to manage the SSL bindings for app's hostnames. - /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// <code>true</code> if reserved; otherwise, <code>false</code>. - /// Obsolete: Hyper-V sandbox. - /// Hyper-V sandbox. - /// Last time the app was modified, in UTC. Read-only. - /// Configuration of the app. - /// Azure Traffic Manager hostnames associated with the app. Read-only. - /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. - /// Specifies which deployment slot this app will swap into. Read-only. - /// App Service Environment to use for the app. - /// <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. - /// <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. - /// - /// This composes with ClientCertEnabled setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. - /// - /// client certificate authentication comma-separated exclusion paths. - /// - /// <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. - /// If <code>true</code>, the app is only accessible via API management process. - /// - /// Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. - /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. - /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. - /// Size of the function container. - /// Maximum allowed daily memory-time quota (applicable on dynamic apps only). - /// App suspended till in case memory-time quota is exceeded. - /// - /// Maximum number of workers. - /// This only applies to Functions container. - /// - /// If specified during app creation, the app is cloned from a source app. - /// Name of the resource group the app belongs to. Read-only. - /// <code>true</code> if the app is a default container; otherwise, <code>false</code>. - /// Default hostname of the app. Read-only. - /// Status of the last deployment slot swap operation. - /// - /// HttpsOnly: configures a web site to accept only https requests. Issues redirect for - /// http requests - /// - /// Site redundancy mode. - /// Specifies an operation id if this site has a pending operation. - /// Checks if Customer provided storage account is required. - /// Identity to use for Key Vault Reference authentication. - /// - /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. - /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - /// - /// Kind of resource. - /// A new instance for mocking. - public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceManager.Models.ManagedServiceIdentity identity = null, Resources.Models.ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) - { - tags ??= new Dictionary(); - hostNames ??= new List(); - enabledHostNames ??= new List(); - hostNameSslStates ??= new List(); - trafficManagerHostNames ??= new List(); - - return new WebSiteData(id, name, resourceType, systemData, tags, location, identity, extendedLocation, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), appServicePlanId, isReserved, isXenon, isHyperV, lastModifiedTimeUtc, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind); - } - - /// Initializes a new instance of SiteMachineKey. - /// MachineKey validation. - /// Validation key. - /// Algorithm used for decryption. - /// Decryption key. - /// A new instance for mocking. - public static SiteMachineKey SiteMachineKey(string validation = null, string validationKey = null, string decryption = null, string decryptionKey = null) - { - return new SiteMachineKey(validation, validationKey, decryption, decryptionKey); - } - - /// Initializes a new instance of WebAppPushSettings. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets or sets a flag indicating whether the Push endpoint is enabled. - /// Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. - /// - /// Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint. - /// Tags can consist of alphanumeric characters and the following: - /// '_', '@', '#', '.', ':', '-'. - /// Validation should be performed at the PushRequestHandler. - /// - /// Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppPushSettings WebAppPushSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isPushEnabled = null, string tagWhitelistJson = null, string tagsRequiringAuth = null, string dynamicTagsJson = null, string kind = null) - { - return new WebAppPushSettings(id, name, resourceType, systemData, isPushEnabled, tagWhitelistJson, tagsRequiringAuth, dynamicTagsJson, kind); - } - - /// Initializes a new instance of AppServiceStorageAccessInfo. - /// Type of storage. - /// Name of the storage account. - /// Name of the file share (container name, for Blob storage). - /// Access key for the storage account. - /// Path to mount the storage within the site's runtime environment. - /// State of the storage account. - /// A new instance for mocking. - public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null) - { - return new AppServiceStorageAccessInfo(storageType, accountName, shareName, accessKey, mountPath, state); - } - - /// Initializes a new instance of SlotSwapStatus. - /// The time the last successful slot swap completed. - /// The source slot of the last swap operation. - /// The destination slot of the last swap operation. - /// A new instance for mocking. - public static SlotSwapStatus SlotSwapStatus(DateTimeOffset? timestampUtc = null, string sourceSlotName = null, string destinationSlotName = null) - { - return new SlotSwapStatus(timestampUtc, sourceSlotName, destinationSlotName); - } - - /// Initializes a new instance of CsmUsageQuota. - /// Units of measurement for the quota resource. - /// Next reset time for the resource counter. - /// The current value of the resource counter. - /// The resource limit. - /// Quota name. - /// A new instance for mocking. - public static CsmUsageQuota CsmUsageQuota(string unit = null, DateTimeOffset? nextResetOn = null, long? currentValue = null, long? limit = null, LocalizableString name = null) - { - return new CsmUsageQuota(unit, nextResetOn, currentValue, limit, name); - } - - /// Initializes a new instance of LocalizableString. - /// Non-localized name. - /// Localized name. - /// A new instance for mocking. - public static LocalizableString LocalizableString(string value = null, string localizedValue = null) - { - return new LocalizableString(value, localizedValue); - } - - /// Initializes a new instance of AppServicePlanPatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Target worker tier assigned to the App Service plan. - /// App Service plan status. - /// App Service plan subscription. - /// Specification for the App Service Environment to use for the App Service plan. - /// Maximum number of instances that can be assigned to this App Service plan. - /// Geographical location for the App Service plan. - /// - /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. - /// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. - /// - /// ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku. - /// Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. - /// Number of apps assigned to this App Service plan. - /// If <code>true</code>, this App Service Plan owns spot instances. - /// The time when the server farm expires. Valid only if it is a spot server farm. - /// The time when the server farm free offer expires. - /// Resource group of the App Service plan. - /// If Linux app service plan <code>true</code>, <code>false</code> otherwise. - /// Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. - /// If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. - /// Scaling worker count. - /// Scaling worker size ID. - /// Provisioning state of the App Service Plan. - /// Specification for the Kubernetes Environment to use for the App Service plan. - /// - /// If <code>true</code>, this App Service Plan will perform availability zone balancing. - /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. - /// - /// Kind of resource. - /// A new instance for mocking. - public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) - { - return new AppServicePlanPatch(id, name, resourceType, systemData, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpirationOn, freeOfferExpirationOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind); - } - - /// Initializes a new instance of HybridConnectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the Service Bus namespace. - /// The name of the Service Bus relay. - /// The ARM URI to the Service Bus relay. - /// The hostname of the endpoint. - /// The port of the endpoint. - /// The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. - /// - /// The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM this key will not be returned - /// normally, use the POST /listKeys API instead. - /// - /// The suffix for the service bus endpoint. By default this is .servicebus.windows.net. - /// Kind of resource. - /// A new instance for mocking. - public static HybridConnectionData HybridConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serviceBusNamespace = null, string relayName = null, ResourceIdentifier relayArmId = null, string hostname = null, int? port = null, string sendKeyName = null, string sendKeyValue = null, string serviceBusSuffix = null, string kind = null) - { - return new HybridConnectionData(id, name, resourceType, systemData, serviceBusNamespace, relayName, relayArmId, hostname, port, sendKeyName, sendKeyValue, serviceBusSuffix, kind); - } - - /// Initializes a new instance of HybridConnectionKey. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the send key. - /// The value of the send key. - /// Kind of resource. - /// A new instance for mocking. - public static HybridConnectionKey HybridConnectionKey(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sendKeyName = null, string sendKeyValue = null, string kind = null) - { - return new HybridConnectionKey(id, name, resourceType, systemData, sendKeyName, sendKeyValue, kind); - } - - /// Initializes a new instance of HybridConnectionLimitData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The current number of Hybrid Connections. - /// The maximum number of Hybrid Connections allowed. - /// Kind of resource. - /// A new instance for mocking. - public static HybridConnectionLimitData HybridConnectionLimitData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? current = null, int? maximum = null, string kind = null) - { - return new HybridConnectionLimitData(id, name, resourceType, systemData, current, maximum, kind); - } - - /// Initializes a new instance of AppServiceVirtualNetworkData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Virtual Network's resource ID. - /// The client certificate thumbprint. - /// - /// A certificate file (.cer) blob containing the public key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// - /// The routes that this Virtual Network connection uses. - /// <code>true</code> if a resync is required; otherwise, <code>false</code>. - /// DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. - /// Flag that is used to denote if this is VNET injection. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceVirtualNetworkData AppServiceVirtualNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier vnetResourceId = null, string certThumbprintString = null, string certBlob = null, IEnumerable routes = null, bool? isResyncRequired = null, string dnsServers = null, bool? isSwift = null, string kind = null) - { - routes ??= new List(); - - return new AppServiceVirtualNetworkData(id, name, resourceType, systemData, vnetResourceId, certThumbprintString, certBlob, routes?.ToList(), isResyncRequired, dnsServers, isSwift, kind); - } - - /// Initializes a new instance of AppServiceVirtualNetworkProperties. - /// The Virtual Network's resource ID. - /// The client certificate thumbprint. - /// - /// A certificate file (.cer) blob containing the public key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// - /// The routes that this Virtual Network connection uses. - /// <code>true</code> if a resync is required; otherwise, <code>false</code>. - /// DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. - /// Flag that is used to denote if this is VNET injection. - /// A new instance for mocking. - public static AppServiceVirtualNetworkProperties AppServiceVirtualNetworkProperties(ResourceIdentifier vnetResourceId = null, string certThumbprintString = null, string certBlob = null, IEnumerable routes = null, bool? isResyncRequired = null, string dnsServers = null, bool? isSwift = null) - { - routes ??= new List(); - - return new AppServiceVirtualNetworkProperties(vnetResourceId, certThumbprintString, certBlob, routes?.ToList(), isResyncRequired, dnsServers, isSwift); - } - - /// Initializes a new instance of AppServiceVirtualNetworkRoute. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. - /// The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. - /// - /// The type of route this is: - /// DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 - /// INHERITED - Routes inherited from the real Virtual Network routes - /// STATIC - Static route set on the app only - /// - /// These values will be used for syncing an app's routes with those from a Virtual Network. - /// - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceVirtualNetworkRoute AppServiceVirtualNetworkRoute(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string startAddress = null, string endAddress = null, AppServiceVirtualNetworkRouteType? routeType = null, string kind = null) - { - return new AppServiceVirtualNetworkRoute(id, name, resourceType, systemData, startAddress, endAddress, routeType, kind); - } - - /// Initializes a new instance of AppServiceVirtualNetworkGatewayData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Virtual Network name. - /// The URI where the VPN package can be downloaded. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceVirtualNetworkGatewayData AppServiceVirtualNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vnetName = null, Uri vpnPackageUri = null, string kind = null) - { - return new AppServiceVirtualNetworkGatewayData(id, name, resourceType, systemData, vnetName, vpnPackageUri, kind); - } - - /// Initializes a new instance of AppCertificateData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Certificate password. - /// Friendly name of the certificate. - /// Subject name of the certificate. - /// Host names the certificate applies to. - /// Pfx blob. - /// App name. - /// Self link. - /// Certificate issuer. - /// Certificate issue Date. - /// Certificate expiration date. - /// Certificate thumbprint. - /// Is the certificate valid?. - /// Raw bytes of .cer file. - /// Public key hash. - /// Specification for the App Service Environment to use for the certificate. - /// Key Vault Csm resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// CNAME of the certificate to be issued via free certificate. - /// Method of domain validation for free cert. - /// Kind of resource. - /// A new instance for mocking. - public static AppCertificateData AppCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string password = null, string friendlyName = null, string subjectName = null, IEnumerable hostNames = null, byte[] pfxBlob = null, string siteName = null, string selfLink = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprintString = null, bool? isValid = null, byte[] cerBlob = null, string publicKeyHash = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? keyVaultSecretStatus = null, ResourceIdentifier serverFarmId = null, string canonicalName = null, string domainValidationMethod = null, string kind = null) - { - tags ??= new Dictionary(); - hostNames ??= new List(); - - return new AppCertificateData(id, name, resourceType, systemData, tags, location, password, friendlyName, subjectName, hostNames?.ToList(), pfxBlob, siteName, selfLink, issuer, issueOn, expireOn, thumbprintString, isValid, cerBlob, publicKeyHash, hostingEnvironmentProfile, keyVaultId, keyVaultSecretName, keyVaultSecretStatus, serverFarmId, canonicalName, domainValidationMethod, kind); - } - - /// Initializes a new instance of AppCertificatePatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Certificate password. - /// Friendly name of the certificate. - /// Subject name of the certificate. - /// Host names the certificate applies to. - /// Pfx blob. - /// App name. - /// Self link. - /// Certificate issuer. - /// Certificate issue Date. - /// Certificate expiration date. - /// Certificate thumbprint. - /// Is the certificate valid?. - /// Raw bytes of .cer file. - /// Public key hash. - /// Specification for the App Service Environment to use for the certificate. - /// Key Vault Csm resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// CNAME of the certificate to be issued via free certificate. - /// Method of domain validation for free cert. - /// Kind of resource. - /// A new instance for mocking. - public static AppCertificatePatch AppCertificatePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string password = null, string friendlyName = null, string subjectName = null, IEnumerable hostNames = null, byte[] pfxBlob = null, string siteName = null, string selfLink = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprintString = null, bool? isValid = null, byte[] cerBlob = null, string publicKeyHash = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? keyVaultSecretStatus = null, ResourceIdentifier serverFarmId = null, string canonicalName = null, string domainValidationMethod = null, string kind = null) - { - hostNames ??= new List(); - - return new AppCertificatePatch(id, name, resourceType, systemData, password, friendlyName, subjectName, hostNames?.ToList(), pfxBlob, siteName, selfLink, issuer, issueOn, expireOn, thumbprintString, isValid, cerBlob, publicKeyHash, hostingEnvironmentProfile, keyVaultId, keyVaultSecretName, keyVaultSecretStatus, serverFarmId, canonicalName, domainValidationMethod, kind); - } - - /// Initializes a new instance of DeletedSiteData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Numeric id for the deleted site. - /// Time in UTC when the app was deleted. - /// Subscription containing the deleted site. - /// ResourceGroup that contained the deleted site. - /// Name of the deleted site. - /// Slot of the deleted site. - /// Kind of site that was deleted. - /// Geo Region of the deleted site. - /// Kind of resource. - /// A new instance for mocking. - public static DeletedSiteData DeletedSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? deletedSiteId = null, string deletedTimestamp = null, string subscription = null, string resourceGroup = null, string deletedSiteName = null, string slot = null, string kindPropertiesKind = null, string geoRegionName = null, string kind = null) - { - return new DeletedSiteData(id, name, resourceType, systemData, deletedSiteId, deletedTimestamp, subscription, resourceGroup, deletedSiteName, slot, kindPropertiesKind, geoRegionName, kind); - } - - /// Initializes a new instance of DiagnosticCategoryData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Description of the diagnostic category. - /// Kind of resource. - /// A new instance for mocking. - public static DiagnosticCategoryData DiagnosticCategoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string kind = null) - { - return new DiagnosticCategoryData(id, name, resourceType, systemData, description, kind); - } - - /// Initializes a new instance of WebSiteAnalysisDefinitionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Description of the Analysis. - /// Kind of resource. - /// A new instance for mocking. - public static WebSiteAnalysisDefinitionData WebSiteAnalysisDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string kind = null) - { - return new WebSiteAnalysisDefinitionData(id, name, resourceType, systemData, description, kind); - } - - /// Initializes a new instance of DiagnosticAnalysis. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Start time of the period. - /// End time of the period. - /// List of time periods. - /// Data by each detector. - /// Data by each detector for detectors that did not corelate. - /// Kind of resource. - /// A new instance for mocking. - public static DiagnosticAnalysis DiagnosticAnalysis(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable abnormalTimePeriods = null, IEnumerable payload = null, IEnumerable nonCorrelatedDetectors = null, string kind = null) - { - abnormalTimePeriods ??= new List(); - payload ??= new List(); - nonCorrelatedDetectors ??= new List(); - - return new DiagnosticAnalysis(id, name, resourceType, systemData, startOn, endOn, abnormalTimePeriods?.ToList(), payload?.ToList(), nonCorrelatedDetectors?.ToList(), kind); - } - - /// Initializes a new instance of DetectorDefinition. - /// Display name of the detector. - /// Description of the detector. - /// Detector Rank. - /// Flag representing whether detector is enabled or not. - /// A new instance for mocking. - public static DetectorDefinition DetectorDefinition(string displayName = null, string description = null, double? rank = null, bool? isEnabled = null) - { - return new DetectorDefinition(displayName, description, rank, isEnabled); - } - - /// Initializes a new instance of DetectorDefinitionResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Display name of the detector. - /// Description of the detector. - /// Detector Rank. - /// Flag representing whether detector is enabled or not. - /// Kind of resource. - /// A new instance for mocking. - public static DetectorDefinitionResourceData DetectorDefinitionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, double? rank = null, bool? isEnabled = null, string kind = null) - { - return new DetectorDefinitionResourceData(id, name, resourceType, systemData, displayName, description, rank, isEnabled, kind); - } - - /// Initializes a new instance of AppSnapshot. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The time the snapshot was taken. - /// Kind of resource. - /// A new instance for mocking. - public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string time = null, string kind = null) - { - return new AppSnapshot(id, name, resourceType, systemData, time, kind); - } - - /// Initializes a new instance of KubeEnvironmentData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Extended Location. - /// Provisioning state of the Kubernetes Environment. - /// Any errors that occurred during deployment or deployment validation. - /// Only visible within Vnet/Subnet. - /// Default Domain Name for the cluster. - /// Static IP of the KubeEnvironment. - /// - /// Cluster configuration which determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// - /// - /// Cluster configuration which enables the log daemon to export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// - /// - /// Kind of resource. - /// A new instance for mocking. - public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Resources.Models.ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) - { - tags ??= new Dictionary(); - - return new KubeEnvironmentData(id, name, resourceType, systemData, tags, location, extendedLocation, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind); - } - - /// Initializes a new instance of KubeEnvironmentPatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Provisioning state of the Kubernetes Environment. - /// Any errors that occurred during deployment or deployment validation. - /// Only visible within Vnet/Subnet. - /// Default Domain Name for the cluster. - /// Static IP of the KubeEnvironment. - /// - /// Cluster configuration which determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// - /// - /// Cluster configuration which enables the log daemon to export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// - /// - /// Kind of resource. - /// A new instance for mocking. - public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) - { - return new KubeEnvironmentPatch(id, name, resourceType, systemData, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind); - } - - /// Initializes a new instance of ApplicationStackResource. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Application stack name. - /// Application stack display name. - /// Application stack dependency. - /// List of major versions available. - /// List of frameworks associated with application stack. - /// <code>true</code> if this is the stack is deprecated; otherwise, <code>false</code>. - /// Kind of resource. - /// A new instance for mocking. - public static ApplicationStackResource ApplicationStackResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string stackName = null, string display = null, string dependency = null, IEnumerable majorVersions = null, IEnumerable frameworks = null, IEnumerable isDeprecated = null, string kind = null) - { - majorVersions ??= new List(); - frameworks ??= new List(); - isDeprecated ??= new List(); - - return new ApplicationStackResource(id, name, resourceType, systemData, stackName, display, dependency, majorVersions?.ToList(), frameworks?.ToList(), isDeprecated?.ToList(), kind); - } - - /// Initializes a new instance of FunctionAppStack. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Function App stack location. - /// Function App stack (display only). - /// Function App stack name. - /// List of major versions available. - /// Function App stack preferred OS. - /// Kind of resource. - /// A new instance for mocking. - public static FunctionAppStack FunctionAppStack(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string displayText = null, string value = null, IEnumerable majorVersions = null, StackPreferredOS? preferredOS = null, string kind = null) - { - majorVersions ??= new List(); - - return new FunctionAppStack(id, name, resourceType, systemData, location, displayText, value, majorVersions?.ToList(), preferredOS, kind); - } - - /// Initializes a new instance of FunctionAppMajorVersion. - /// Function App stack major version (display only). - /// Function App stack major version name. - /// Minor versions associated with the major version. - /// A new instance for mocking. - public static FunctionAppMajorVersion FunctionAppMajorVersion(string displayText = null, string value = null, IEnumerable minorVersions = null) - { - minorVersions ??= new List(); - - return new FunctionAppMajorVersion(displayText, value, minorVersions?.ToList()); - } - - /// Initializes a new instance of FunctionAppMinorVersion. - /// Function App stack (display only). - /// Function App stack name. - /// Settings associated with the minor version. - /// A new instance for mocking. - public static FunctionAppMinorVersion FunctionAppMinorVersion(string displayText = null, string value = null, FunctionAppRuntimes stackSettings = null) - { - return new FunctionAppMinorVersion(displayText, value, stackSettings); - } - - /// Initializes a new instance of FunctionAppRuntimes. - /// Linux-specific settings associated with the minor version. - /// Windows-specific settings associated with the minor version. - /// A new instance for mocking. - public static FunctionAppRuntimes FunctionAppRuntimes(FunctionAppRuntimeSettings linuxRuntimeSettings = null, FunctionAppRuntimeSettings windowsRuntimeSettings = null) - { - return new FunctionAppRuntimes(linuxRuntimeSettings, windowsRuntimeSettings); - } - - /// Initializes a new instance of FunctionAppRuntimeSettings. - /// Function App stack minor version (runtime only). - /// <code>true</code> if remote debugging is supported for the stack; otherwise, <code>false</code>. - /// Application Insights settings associated with the minor version. - /// GitHub Actions settings associated with the minor version. - /// Application settings associated with the minor version. - /// Configuration settings associated with the minor version. - /// List of supported Functions extension versions. - /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. - /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. - /// End-of-life date for the minor version. - /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. - /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. - /// <code>true</code> if the minor version the default; otherwise, <code>false</code>. - /// A new instance for mocking. - public static FunctionAppRuntimeSettings FunctionAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = null, AppInsightsWebAppStackSettings appInsightsSettings = null, GitHubActionWebAppStackSettings gitHubActionSettings = null, IReadOnlyDictionary appSettingsDictionary = null, SiteConfigPropertiesDictionary siteConfigPropertiesDictionary = null, IEnumerable supportedFunctionsExtensionVersions = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null, bool? isDefault = null) - { - appSettingsDictionary ??= new Dictionary(); - supportedFunctionsExtensionVersions ??= new List(); - - return new FunctionAppRuntimeSettings(runtimeVersion, isRemoteDebuggingSupported, appInsightsSettings, gitHubActionSettings, appSettingsDictionary, siteConfigPropertiesDictionary, supportedFunctionsExtensionVersions?.ToList(), isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess, isDefault); - } - - /// Initializes a new instance of AppInsightsWebAppStackSettings. - /// <code>true</code> if remote Application Insights is supported for the stack; otherwise, <code>false</code>. - /// <code>true</code> if Application Insights is disabled by default for the stack; otherwise, <code>false</code>. - /// A new instance for mocking. - public static AppInsightsWebAppStackSettings AppInsightsWebAppStackSettings(bool? isSupported = null, bool? isDefaultOff = null) - { - return new AppInsightsWebAppStackSettings(isSupported, isDefaultOff); - } - - /// Initializes a new instance of GitHubActionWebAppStackSettings. - /// <code>true</code> if GitHub Actions is supported for the stack; otherwise, <code>false</code>. - /// The minor version that is supported for GitHub Actions. - /// A new instance for mocking. - public static GitHubActionWebAppStackSettings GitHubActionWebAppStackSettings(bool? isSupported = null, string supportedVersion = null) - { - return new GitHubActionWebAppStackSettings(isSupported, supportedVersion); - } - - /// Initializes a new instance of SiteConfigPropertiesDictionary. - /// <code>true</code> if use32BitWorkerProcess should be set to true for the stack; otherwise, <code>false</code>. - /// LinuxFxVersion configuration setting. - /// JavaVersion configuration setting. - /// PowerShellVersion configuration setting. - /// A new instance for mocking. - public static SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = null, string linuxFxVersion = null, string javaVersion = null, string powerShellVersion = null) - { - return new SiteConfigPropertiesDictionary(use32BitWorkerProcess, linuxFxVersion, javaVersion, powerShellVersion); - } - - /// Initializes a new instance of WebAppStack. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Web App stack location. - /// Web App stack (display only). - /// Web App stack name. - /// List of major versions available. - /// Web App stack preferred OS. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppStack WebAppStack(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string displayText = null, string value = null, IEnumerable majorVersions = null, StackPreferredOS? preferredOS = null, string kind = null) - { - majorVersions ??= new List(); - - return new WebAppStack(id, name, resourceType, systemData, location, displayText, value, majorVersions?.ToList(), preferredOS, kind); - } - - /// Initializes a new instance of WebAppMajorVersion. - /// Web App stack major version (display only). - /// Web App stack major version name. - /// Minor versions associated with the major version. - /// A new instance for mocking. - public static WebAppMajorVersion WebAppMajorVersion(string displayText = null, string value = null, IEnumerable minorVersions = null) - { - minorVersions ??= new List(); - - return new WebAppMajorVersion(displayText, value, minorVersions?.ToList()); - } - - /// Initializes a new instance of WebAppMinorVersion. - /// Web App stack minor version (display only). - /// Web App stack major version name. - /// Settings associated with the minor version. - /// A new instance for mocking. - public static WebAppMinorVersion WebAppMinorVersion(string displayText = null, string value = null, WebAppRuntimes stackSettings = null) - { - return new WebAppMinorVersion(displayText, value, stackSettings); - } - - /// Initializes a new instance of WebAppRuntimes. - /// Linux-specific settings associated with the minor version. - /// Windows-specific settings associated with the minor version. - /// Linux-specific settings associated with the Java container minor version. - /// Windows-specific settings associated with the Java container minor version. - /// A new instance for mocking. - public static WebAppRuntimes WebAppRuntimes(WebAppRuntimeSettings linuxRuntimeSettings = null, WebAppRuntimeSettings windowsRuntimeSettings = null, LinuxJavaContainerSettings linuxContainerSettings = null, WindowsJavaContainerSettings windowsContainerSettings = null) - { - return new WebAppRuntimes(linuxRuntimeSettings, windowsRuntimeSettings, linuxContainerSettings, windowsContainerSettings); - } - - /// Initializes a new instance of WebAppRuntimeSettings. - /// Web App stack minor version (runtime only). - /// <code>true</code> if remote debugging is supported for the stack; otherwise, <code>false</code>. - /// Application Insights settings associated with the minor version. - /// GitHub Actions settings associated with the minor version. - /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. - /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. - /// End-of-life date for the minor version. - /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. - /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. - /// A new instance for mocking. - public static WebAppRuntimeSettings WebAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = null, AppInsightsWebAppStackSettings appInsightsSettings = null, GitHubActionWebAppStackSettings gitHubActionSettings = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) - { - return new WebAppRuntimeSettings(runtimeVersion, isRemoteDebuggingSupported, appInsightsSettings, gitHubActionSettings, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); - } - - /// Initializes a new instance of LinuxJavaContainerSettings. - /// Java 11 version (runtime only). - /// Java 8 version (runtime only). - /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. - /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. - /// End-of-life date for the minor version. - /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. - /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. - /// A new instance for mocking. - public static LinuxJavaContainerSettings LinuxJavaContainerSettings(string java11Runtime = null, string java8Runtime = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) - { - return new LinuxJavaContainerSettings(java11Runtime, java8Runtime, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); - } - - /// Initializes a new instance of WindowsJavaContainerSettings. - /// Java container (runtime only). - /// Java container version (runtime only). - /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. - /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. - /// End-of-life date for the minor version. - /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. - /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. - /// A new instance for mocking. - public static WindowsJavaContainerSettings WindowsJavaContainerSettings(string javaContainer = null, string javaContainerVersion = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) - { - return new WindowsJavaContainerSettings(javaContainer, javaContainerVersion, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); - } - - /// Initializes a new instance of AppServiceRecommendation. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Timestamp when this instance was created. - /// A GUID value that each recommendation object is associated with. - /// Full ARM resource ID string that this recommendation object is associated with. - /// Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. - /// Unique name of the rule. - /// UI friendly name of the rule (may not be unique). - /// Recommendation text. - /// Level indicating how critical this recommendation can impact. - /// List of channels that this recommendation can apply. - /// The list of category tags that this recommendation belongs to. - /// Name of action recommended by this object. - /// True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. - /// The list of states of this recommendation. If it's null then it should be considered "Active". - /// The beginning time in UTC of a range that the recommendation refers to. - /// The end time in UTC of a range that the recommendation refers to. - /// When to notify this recommendation next in UTC. Null means that this will never be notified anymore. - /// Date and time in UTC when this notification expires. - /// Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. - /// A metric value measured by the rule. - /// True if this is associated with a dynamically added rule. - /// Extension name of the portal if exists. - /// Deep link to a blade on the portal. - /// Forward link to an external document associated with the rule. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceRecommendation AppServiceRecommendation(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, Guid? recommendationId = null, ResourceIdentifier resourceId = null, ResourceScopeType? resourceScope = null, string ruleName = null, string displayName = null, string message = null, NotificationLevel? level = null, RecommendationChannel? channels = null, IEnumerable categoryTags = null, string actionName = null, int? enabled = null, IEnumerable states = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? nextNotificationOn = null, DateTimeOffset? notificationExpirationOn = null, DateTimeOffset? notifiedOn = null, double? score = null, bool? isDynamic = null, string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) - { - categoryTags ??= new List(); - states ??= new List(); - - return new AppServiceRecommendation(id, name, resourceType, systemData, createdOn, recommendationId, resourceId, resourceScope, ruleName, displayName, message, level, channels, categoryTags?.ToList(), actionName, enabled, states?.ToList(), startOn, endOn, nextNotificationOn, notificationExpirationOn, notifiedOn, score, isDynamic, extensionName, bladeName, forwardLink, kind); - } - - /// Initializes a new instance of RecommendationRuleData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Unique name of the rule. - /// UI friendly name of the rule. - /// Localized name of the rule (Good for UI). - /// - /// Recommendation ID of an associated recommendation object tied to the rule, if exists. - /// If such an object doesn't exist, it is set to null. - /// - /// Localized detailed description of the rule. - /// Name of action that is recommended by this rule in string. - /// Level of impact indicating how critical this rule is. - /// List of available channels that this rule applies. - /// The list of category tags that this recommendation rule belongs to. - /// True if this is associated with a dynamically added rule. - /// Extension name of the portal if exists. Applicable to dynamic rule only. - /// Deep link to a blade on the portal. Applicable to dynamic rule only. - /// Forward link to an external document associated with the rule. Applicable to dynamic rule only. - /// Kind of resource. - /// A new instance for mocking. - public static RecommendationRuleData RecommendationRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string recommendationName = null, string displayName = null, string message = null, Guid? recommendationId = null, string description = null, string actionName = null, NotificationLevel? level = null, RecommendationChannel? channels = null, IEnumerable categoryTags = null, bool? isDynamic = null, string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) - { - categoryTags ??= new List(); - - return new RecommendationRuleData(id, name, resourceType, systemData, recommendationName, displayName, message, recommendationId, description, actionName, level, channels, categoryTags?.ToList(), isDynamic, extensionName, bladeName, forwardLink, kind); - } - - /// Initializes a new instance of ResourceHealthMetadataData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The category that the resource matches in the RHC Policy File. - /// Is there a health signal for the resource. - /// Kind of resource. - /// A new instance for mocking. - public static ResourceHealthMetadataData ResourceHealthMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string category = null, bool? isSignalAvailable = null, string kind = null) - { - return new ResourceHealthMetadataData(id, name, resourceType, systemData, category, isSignalAvailable, kind); - } - - /// Initializes a new instance of PublishingUserData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Username used for publishing. - /// Password used for publishing. - /// Password hash used for publishing. - /// Password hash salt used for publishing. - /// Url of SCM site. - /// Kind of resource. - /// A new instance for mocking. - public static PublishingUserData PublishingUserData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publishingUserName = null, string publishingPassword = null, string publishingPasswordHash = null, string publishingPasswordHashSalt = null, Uri scmUri = null, string kind = null) - { - return new PublishingUserData(id, name, resourceType, systemData, publishingUserName, publishingPassword, publishingPasswordHash, publishingPasswordHashSalt, scmUri, kind); - } - - /// Initializes a new instance of AppServiceSourceControlData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// OAuth access token. - /// OAuth access token secret. - /// OAuth refresh token. - /// OAuth token expiration. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceSourceControlData AppServiceSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string token = null, string tokenSecret = null, string refreshToken = null, DateTimeOffset? expireOn = null, string kind = null) - { - return new AppServiceSourceControlData(id, name, resourceType, systemData, token, tokenSecret, refreshToken, expireOn, kind); - } - - /// Initializes a new instance of AppServiceBillingMeter. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Meter GUID onboarded in Commerce. - /// Azure Location of billable resource. - /// Short Name from App Service Azure pricing Page. - /// Friendly name of the meter. - /// App Service OS type meter used for. - /// Meter Multiplier. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceBillingMeter AppServiceBillingMeter(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? meterId = null, AzureLocation? billingLocation = null, string shortName = null, string friendlyName = null, string osType = null, double? multiplier = null, string kind = null) - { - return new AppServiceBillingMeter(id, name, resourceType, systemData, meterId, billingLocation, shortName, friendlyName, osType, multiplier, kind); - } - - /// Initializes a new instance of ResourceNameAvailability. - /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. - /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. - /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. - /// A new instance for mocking. - public static ResourceNameAvailability ResourceNameAvailability(bool? isNameAvailable = null, InAvailabilityReasonType? reason = null, string message = null) - { - return new ResourceNameAvailability(isNameAvailable, reason, message); - } - - /// Initializes a new instance of AppServiceDeploymentLocations. - /// Available regions. - /// Available App Service Environments with full descriptions of the environments. - /// Available App Service Environments with basic information. - /// A new instance for mocking. - public static AppServiceDeploymentLocations AppServiceDeploymentLocations(IEnumerable locations = null, IEnumerable hostingEnvironments = null, IEnumerable hostingEnvironmentDeploymentInfos = null) - { - locations ??= new List(); - hostingEnvironments ??= new List(); - hostingEnvironmentDeploymentInfos ??= new List(); - - return new AppServiceDeploymentLocations(locations?.ToList(), hostingEnvironments?.ToList(), hostingEnvironmentDeploymentInfos?.ToList()); - } - - /// Initializes a new instance of AppServiceGeoRegion. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Region description. - /// Display name for region. - /// Display name for region. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceGeoRegion AppServiceGeoRegion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string displayName = null, string orgDomain = null, string kind = null) - { - return new AppServiceGeoRegion(id, name, resourceType, systemData, description, displayName, orgDomain, kind); - } - - /// Initializes a new instance of HostingEnvironmentDeploymentInfo. - /// Name of the App Service Environment. - /// Location of the App Service Environment. - /// A new instance for mocking. - public static HostingEnvironmentDeploymentInfo HostingEnvironmentDeploymentInfo(string name = null, AzureLocation? location = null) - { - return new HostingEnvironmentDeploymentInfo(name, location); - } - - /// Initializes a new instance of AppServiceIdentifierData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// String representation of the identity. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) - { - return new AppServiceIdentifierData(id, name, resourceType, systemData, value, kind); - } - - /// Initializes a new instance of PremierAddOnOffer. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Premier add on SKU. - /// Premier add on offer Product. - /// Premier add on offer Vendor. - /// <code>true</code> if promotion code is required; otherwise, <code>false</code>. - /// Premier add on offer Quota. - /// App Service plans this offer is restricted to. - /// Privacy policy URL. - /// Legal terms URL. - /// Marketplace publisher. - /// Marketplace offer. - /// Kind of resource. - /// A new instance for mocking. - public static PremierAddOnOffer PremierAddOnOffer(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sku = null, string product = null, string vendor = null, bool? isPromoCodeRequired = null, int? quota = null, AppServicePlanRestriction? webHostingPlanRestrictions = null, Uri privacyPolicyUri = null, Uri legalTermsUri = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) - { - return new PremierAddOnOffer(id, name, resourceType, systemData, sku, product, vendor, isPromoCodeRequired, quota, webHostingPlanRestrictions, privacyPolicyUri, legalTermsUri, marketplacePublisher, marketplaceOffer, kind); - } - - /// Initializes a new instance of AppServiceSkuResult. - /// Resource type that this SKU applies to. - /// List of SKUs the subscription is able to use. - /// A new instance for mocking. - public static AppServiceSkuResult AppServiceSkuResult(ResourceType? resourceType = null, IEnumerable skus = null) - { - skus ??= new List(); - - return new AppServiceSkuResult(resourceType, skus?.ToList()); - } - - /// Initializes a new instance of GlobalCsmSkuDescription. - /// Name of the resource SKU. - /// Service Tier of the resource SKU. - /// Size specifier of the resource SKU. - /// Family code of the resource SKU. - /// Min, max, and default scale values of the SKU. - /// Locations of the SKU. - /// Capabilities of the SKU, e.g., is traffic manager enabled?. - /// A new instance for mocking. - public static GlobalCsmSkuDescription GlobalCsmSkuDescription(string name = null, string tier = null, string size = null, string family = null, AppServiceSkuCapacity capacity = null, IEnumerable locations = null, IEnumerable capabilities = null) - { - locations ??= new List(); - capabilities ??= new List(); - - return new GlobalCsmSkuDescription(name, tier, size, family, capacity, locations?.ToList(), capabilities?.ToList()); - } - - /// Initializes a new instance of AppServiceVirtualNetworkValidationContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Resource Group of the VNET to be validated. - /// The name of the VNET to be validated. - /// The subnet name to be validated. - /// The ARM Resource ID of the subnet to validate. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceVirtualNetworkValidationContent AppServiceVirtualNetworkValidationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vnetResourceGroup = null, string vnetName = null, string vnetSubnetName = null, ResourceIdentifier subnetResourceId = null, string kind = null) - { - return new AppServiceVirtualNetworkValidationContent(id, name, resourceType, systemData, vnetResourceGroup, vnetName, vnetSubnetName, subnetResourceId, kind); - } - - /// Initializes a new instance of VirtualNetworkValidationFailureDetails. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Text describing the validation outcome. - /// A flag describing whether or not validation failed. - /// A list of tests that failed in the validation. - /// A list of warnings generated during validation. - /// Kind of resource. - /// A new instance for mocking. - public static VirtualNetworkValidationFailureDetails VirtualNetworkValidationFailureDetails(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string message = null, bool? isFailed = null, IEnumerable failedTests = null, IEnumerable warnings = null, string kind = null) - { - failedTests ??= new List(); - warnings ??= new List(); - - return new VirtualNetworkValidationFailureDetails(id, name, resourceType, systemData, message, isFailed, failedTests?.ToList(), warnings?.ToList(), kind); - } - - /// Initializes a new instance of VirtualNetworkValidationTestFailure. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the test that failed. - /// The details of what caused the failure, e.g. the blocking rule name, etc. - /// Kind of resource. - /// A new instance for mocking. - public static VirtualNetworkValidationTestFailure VirtualNetworkValidationTestFailure(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string testName = null, string details = null, string kind = null) - { - return new VirtualNetworkValidationTestFailure(id, name, resourceType, systemData, testName, details, kind); - } - - /// Initializes a new instance of AppServiceValidateResult. - /// Result of validation. - /// Error details for the case when validation fails. - /// A new instance for mocking. - public static AppServiceValidateResult AppServiceValidateResult(string status = null, ValidateResponseError error = null) - { - return new AppServiceValidateResult(status, error); - } - - /// Initializes a new instance of ValidateResponseError. - /// Validation error code. - /// Validation error message. - /// A new instance for mocking. - public static ValidateResponseError ValidateResponseError(string code = null, string message = null) - { - return new ValidateResponseError(code, message); - } - - /// Initializes a new instance of StaticSitesWorkflowPreviewContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// URL for the repository of the static site. - /// The target branch in the repository. - /// Build properties to configure on the repository. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSitesWorkflowPreviewContent StaticSitesWorkflowPreviewContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repositoryUri = null, string branch = null, StaticSiteBuildProperties buildProperties = null, string kind = null) - { - return new StaticSitesWorkflowPreviewContent(id, name, resourceType, systemData, repositoryUri, branch, buildProperties, kind); - } - - /// Initializes a new instance of StaticSitesWorkflowPreview. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The path for the workflow file to be generated. - /// The contents for the workflow file to be generated. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, string contents = null, string kind = null) - { - return new StaticSitesWorkflowPreview(id, name, resourceType, systemData, path, contents, kind); - } - - /// Initializes a new instance of StaticSiteData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Description of a SKU for a scalable resource. - /// Managed service identity. - /// The default autogenerated hostname for the static site. - /// URL for the repository of the static site. - /// The target branch in the repository. - /// The custom domains associated with this static site. - /// A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. - /// Build properties to configure on the repository. - /// Private endpoint connections. - /// State indicating whether staging environments are allowed or not allowed for a static web app. - /// <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. - /// Template options for generating a new repository. - /// The content distribution endpoint for the static site. - /// Identity to use for Key Vault Reference authentication. - /// User provided function apps registered with the static site. - /// The provider that submitted the last deployment to the primary environment of the static site. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) - { - tags ??= new Dictionary(); - customDomains ??= new List(); - privateEndpointConnections ??= new List(); - userProvidedFunctionApps ??= new List(); - - return new StaticSiteData(id, name, resourceType, systemData, tags, location, sku, identity, defaultHostname, repositoryUri, branch, customDomains?.ToList(), repositoryToken, buildProperties, privateEndpointConnections?.ToList(), stagingEnvironmentPolicy, allowConfigFileUpdates, templateProperties, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), provider, kind); - } - - /// Initializes a new instance of ResponseMessageEnvelopeRemotePrivateEndpointConnection. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. - /// Tags associated with resource. - /// Azure resource manager plan. - /// Resource specific properties. - /// SKU description of the resource. - /// Azure-AsyncOperation Status info. - /// Azure-AsyncOperation Error info. - /// MSI resource. - /// Logical Availability Zones the service is hosted in. - /// A new instance for mocking. - public static ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IReadOnlyDictionary tags = null, AppServiceArmPlan plan = null, RemotePrivateEndpointConnection properties = null, AppServiceSkuDescription sku = null, string status = null, ResponseError error = null, ResourceManager.Models.ManagedServiceIdentity identity = null, IEnumerable zones = null) - { - tags ??= new Dictionary(); - zones ??= new List(); - - return new ResponseMessageEnvelopeRemotePrivateEndpointConnection(id, name, resourceType, systemData, location, tags, plan, properties, sku, status, error, identity, zones?.ToList()); - } - - /// Initializes a new instance of AppServiceArmPlan. - /// The name. - /// The publisher. - /// The product. - /// The promotion code. - /// Version of product. - /// A new instance for mocking. - public static AppServiceArmPlan AppServiceArmPlan(string name = null, string publisher = null, string product = null, string promotionCode = null, string version = null) - { - return new AppServiceArmPlan(name, publisher, product, promotionCode, version); - } - - /// Initializes a new instance of RemotePrivateEndpointConnection. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// PrivateEndpoint of a remote private endpoint connection. - /// The state of a private link connection. - /// Private IPAddresses mapped to the remote private endpoint. - /// Kind of resource. - /// A new instance for mocking. - public static RemotePrivateEndpointConnection RemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null) - { - ipAddresses ??= new List(); - - return new RemotePrivateEndpointConnection(id, name, resourceType, systemData, provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, privateLinkServiceConnectionState, ipAddresses?.ToList(), kind); - } - - /// Initializes a new instance of StaticSiteUserProvidedFunctionAppData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource id of the function app registered with the static site. - /// The region of the function app registered with the static site. - /// The date and time on which the function app was registered with the static site. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFunctionAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier functionAppResourceId = null, string functionAppRegion = null, DateTimeOffset? createdOn = null, string kind = null) - { - return new StaticSiteUserProvidedFunctionAppData(id, name, resourceType, systemData, functionAppResourceId, functionAppRegion, createdOn, kind); - } - - /// Initializes a new instance of StaticSitePatch. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The default autogenerated hostname for the static site. - /// URL for the repository of the static site. - /// The target branch in the repository. - /// The custom domains associated with this static site. - /// A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. - /// Build properties to configure on the repository. - /// Private endpoint connections. - /// State indicating whether staging environments are allowed or not allowed for a static web app. - /// <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. - /// Template options for generating a new repository. - /// The content distribution endpoint for the static site. - /// Identity to use for Key Vault Reference authentication. - /// User provided function apps registered with the static site. - /// The provider that submitted the last deployment to the primary environment of the static site. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) - { - customDomains ??= new List(); - privateEndpointConnections ??= new List(); - userProvidedFunctionApps ??= new List(); - - return new StaticSitePatch(id, name, resourceType, systemData, defaultHostname, repositoryUri, branch, customDomains?.ToList(), repositoryToken, buildProperties, privateEndpointConnections?.ToList(), stagingEnvironmentPolicy, allowConfigFileUpdates, templateProperties, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), provider, kind); - } - - /// Initializes a new instance of StaticSiteUser. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The identity provider for the static site user. - /// The user id for the static site user. - /// The display name for the static site user. - /// The roles for the static site user, in free-form string format. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteUser StaticSiteUser(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provider = null, string userId = null, string displayName = null, string roles = null, string kind = null) - { - return new StaticSiteUser(id, name, resourceType, systemData, provider, userId, displayName, roles, kind); - } - - /// Initializes a new instance of StaticSiteBuildData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// An identifier for the static site build. - /// The source branch. - /// The title of a pull request that a static site build is related to. - /// The hostname for a static site build. - /// When this build was created. - /// When this build was updated. - /// The status of the static site build. - /// User provided function apps registered with the static site build. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, string kind = null) - { - userProvidedFunctionApps ??= new List(); - - return new StaticSiteBuildData(id, name, resourceType, systemData, buildId, sourceBranch, pullRequestTitle, hostname, createdOn, lastUpdatedOn, status, userProvidedFunctionApps?.ToList(), kind); - } - - /// Initializes a new instance of AppServiceConfigurationDictionary. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Settings. - /// Kind of resource. - /// A new instance for mocking. - public static AppServiceConfigurationDictionary AppServiceConfigurationDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) - { - properties ??= new Dictionary(); - - return new AppServiceConfigurationDictionary(id, name, resourceType, systemData, properties, kind); - } - - /// Initializes a new instance of StaticSiteFunctionOverview. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name for the function. - /// The trigger type of the function. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteFunctionOverview StaticSiteFunctionOverview(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string functionName = null, FunctionTriggerType? triggerType = null, string kind = null) - { - return new StaticSiteFunctionOverview(id, name, resourceType, systemData, functionName, triggerType, kind); - } - - /// Initializes a new instance of StaticSiteZipDeployment. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// URL for the zipped app content. - /// URL for the zipped api content. - /// A title to label the deployment. - /// The provider submitting this deployment. - /// The language of the api content, if it exists. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteZipDeployment StaticSiteZipDeployment(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri appZipUri = null, Uri apiZipUri = null, string deploymentTitle = null, string provider = null, string functionLanguage = null, string kind = null) - { - return new StaticSiteZipDeployment(id, name, resourceType, systemData, appZipUri, apiZipUri, deploymentTitle, provider, functionLanguage, kind); - } - - /// Initializes a new instance of StaticSiteUserInvitationContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The domain name for the static site custom domain. - /// The identity provider for the static site user. - /// The user id for the static site user. - /// The roles for the static site user, in free-form string format. - /// The number of hours the sas token stays valid. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteUserInvitationContent StaticSiteUserInvitationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string domain = null, string provider = null, string userDetails = null, string roles = null, int? numHoursToExpiration = null, string kind = null) - { - return new StaticSiteUserInvitationContent(id, name, resourceType, systemData, domain, provider, userDetails, roles, numHoursToExpiration, kind); - } - - /// Initializes a new instance of StaticSiteUserInvitationResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The expiration time of the invitation. - /// The url for the invitation link. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteUserInvitationResult StaticSiteUserInvitationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? expiresOn = null, Uri invitationUri = null, string kind = null) - { - return new StaticSiteUserInvitationResult(id, name, resourceType, systemData, expiresOn, invitationUri, kind); - } - - /// Initializes a new instance of StaticSiteCustomDomainOverviewData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The domain name for the static site custom domain. - /// The date and time on which the custom domain was created for the static site. - /// The status of the custom domain. - /// The TXT record validation token. - /// - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteCustomDomainOverviewData StaticSiteCustomDomainOverviewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string domainName = null, DateTimeOffset? createdOn = null, CustomDomainStatus? status = null, string validationToken = null, string errorMessage = null, string kind = null) - { - return new StaticSiteCustomDomainOverviewData(id, name, resourceType, systemData, domainName, createdOn, status, validationToken, errorMessage, kind); - } - - /// Initializes a new instance of StaticSiteCustomDomainContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Validation method for adding a custom domain. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteCustomDomainContent StaticSiteCustomDomainContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string validationMethod = null, string kind = null) - { - return new StaticSiteCustomDomainContent(id, name, resourceType, systemData, validationMethod, kind); - } - - /// Initializes a new instance of StaticSiteStringList. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of string resources. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteStringList StaticSiteStringList(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable properties = null, string kind = null) - { - properties ??= new List(); - - return new StaticSiteStringList(id, name, resourceType, systemData, properties?.ToList(), kind); - } - - /// Initializes a new instance of StaticSiteResetContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The token which proves admin privileges to the repository. - /// Determines whether the repository should be updated with the new properties. - /// Kind of resource. - /// A new instance for mocking. - public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string repositoryToken = null, bool? shouldUpdateRepository = null, string kind = null) - { - return new StaticSiteResetContent(id, name, resourceType, systemData, repositoryToken, shouldUpdateRepository, kind); - } - - /// Initializes a new instance of SitePatchInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Managed service identity. - /// Current state of the app. - /// Hostnames associated with the app. - /// Name of the repository site. - /// State indicating whether the app has exceeded its quota usage. Read-only. - /// <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). - /// - /// Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, - /// the app is not served on those hostnames. - /// - /// Management information availability state for the app. - /// Hostname SSL states are used to manage the SSL bindings for app's hostnames. - /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// <code>true</code> if reserved; otherwise, <code>false</code>. - /// Obsolete: Hyper-V sandbox. - /// Hyper-V sandbox. - /// Last time the app was modified, in UTC. Read-only. - /// Configuration of the app. - /// Azure Traffic Manager hostnames associated with the app. Read-only. - /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. - /// Specifies which deployment slot this app will swap into. Read-only. - /// App Service Environment to use for the app. - /// <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. - /// <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. - /// - /// This composes with ClientCertEnabled setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. - /// - /// client certificate authentication comma-separated exclusion paths. - /// - /// <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. - /// If <code>true</code>, the app is only accessible via API management process. - /// - /// Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. - /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. - /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. - /// Size of the function container. - /// Maximum allowed daily memory-time quota (applicable on dynamic apps only). - /// App suspended till in case memory-time quota is exceeded. - /// - /// Maximum number of workers. - /// This only applies to Functions container. - /// - /// If specified during app creation, the app is cloned from a source app. - /// Name of the resource group the app belongs to. Read-only. - /// <code>true</code> if the app is a default container; otherwise, <code>false</code>. - /// Default hostname of the app. Read-only. - /// Status of the last deployment slot swap operation. - /// - /// HttpsOnly: configures a web site to accept only https requests. Issues redirect for - /// http requests - /// - /// Site redundancy mode. - /// Specifies an operation id if this site has a pending operation. - /// Checks if Customer provided storage account is required. - /// Identity to use for Key Vault Reference authentication. - /// - /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. - /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - /// - /// Kind of resource. - /// A new instance for mocking. - public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) - { - hostNames ??= new List(); - enabledHostNames ??= new List(); - hostNameSslStates ??= new List(); - trafficManagerHostNames ??= new List(); - - return new SitePatchInfo(id, name, resourceType, systemData, identity, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), serverFarmId, isReserved, isXenon, isHyperV, lastModifiedOn, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind); - } - - /// Initializes a new instance of CustomHostnameAnalysisResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// <code>true</code> if hostname is already verified; otherwise, <code>false</code>. - /// DNS verification test result. - /// Raw failure information if DNS verification fails. - /// <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>. - /// <code>true</code> if there is a conflict across subscriptions; otherwise, <code>false</code>. - /// Name of the conflicting app on scale unit if it's within the same subscription. - /// CName records controller can see for this hostname. - /// TXT records controller can see for this hostname. - /// A records controller can see for this hostname. - /// Alternate CName records controller can see for this hostname. - /// Alternate TXT records controller can see for this hostname. - /// Kind of resource. - /// A new instance for mocking. - public static CustomHostnameAnalysisResult CustomHostnameAnalysisResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isHostnameAlreadyVerified = null, DnsVerificationTestResult? customDomainVerificationTest = null, ResponseError customDomainVerificationFailureInfo = null, bool? hasConflictOnScaleUnit = null, bool? hasConflictAcrossSubscription = null, string conflictingAppResourceId = null, IEnumerable cNameRecords = null, IEnumerable txtRecords = null, IEnumerable aRecords = null, IEnumerable alternateCNameRecords = null, IEnumerable alternateTxtRecords = null, string kind = null) - { - cNameRecords ??= new List(); - txtRecords ??= new List(); - aRecords ??= new List(); - alternateCNameRecords ??= new List(); - alternateTxtRecords ??= new List(); - - return new CustomHostnameAnalysisResult(id, name, resourceType, systemData, isHostnameAlreadyVerified, customDomainVerificationTest, customDomainVerificationFailureInfo, hasConflictOnScaleUnit, hasConflictAcrossSubscription, conflictingAppResourceId, cNameRecords?.ToList(), txtRecords?.ToList(), aRecords?.ToList(), alternateCNameRecords?.ToList(), alternateTxtRecords?.ToList(), kind); - } - - /// Initializes a new instance of WebAppBackupInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Name of the backup. - /// True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. - /// SAS URL to the container. - /// Schedule for the backup if it is executed periodically. - /// Databases included in the backup. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppBackupInfo WebAppBackupInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupName = null, bool? isEnabled = null, Uri storageAccountUri = null, WebAppBackupSchedule backupSchedule = null, IEnumerable databases = null, string kind = null) - { - databases ??= new List(); - - return new WebAppBackupInfo(id, name, resourceType, systemData, backupName, isEnabled, storageAccountUri, backupSchedule, databases?.ToList(), kind); - } - - /// Initializes a new instance of WebAppBackupSchedule. - /// How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day). - /// The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). - /// True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. - /// After how many days backups should be deleted. - /// When the schedule should start working. - /// Last time when this schedule was triggered. - /// A new instance for mocking. - public static WebAppBackupSchedule WebAppBackupSchedule(int frequencyInterval = default, BackupFrequencyUnit frequencyUnit = default, bool shouldKeepAtLeastOneBackup = default, int retentionPeriodInDays = default, DateTimeOffset? startOn = null, DateTimeOffset? lastExecutedOn = null) - { - return new WebAppBackupSchedule(frequencyInterval, frequencyUnit, shouldKeepAtLeastOneBackup, retentionPeriodInDays, startOn, lastExecutedOn); - } - - /// Initializes a new instance of WebAppBackupData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Id of the backup. - /// SAS URL for the storage account container which contains this backup. - /// Name of the blob which contains data for this backup. - /// Name of this backup. - /// Backup status. - /// Size of the backup in bytes. - /// Timestamp of the backup creation. - /// Details regarding this backup. Might contain an error message. - /// List of databases included in the backup. - /// True if this backup has been created due to a schedule being triggered. - /// Timestamp of a last restore operation which used this backup. - /// Timestamp when this backup finished. - /// Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. - /// Size of the original web app which has been backed up. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppBackupData WebAppBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? backupId = null, Uri storageAccountUri = null, string blobName = null, string backupName = null, WebAppBackupStatus? status = null, long? sizeInBytes = null, DateTimeOffset? createdOn = null, string log = null, IEnumerable databases = null, bool? isScheduled = null, DateTimeOffset? lastRestoreOn = null, DateTimeOffset? finishedOn = null, string correlationId = null, long? websiteSizeInBytes = null, string kind = null) - { - databases ??= new List(); - - return new WebAppBackupData(id, name, resourceType, systemData, backupId, storageAccountUri, blobName, backupName, status, sizeInBytes, createdOn, log, databases?.ToList(), isScheduled, lastRestoreOn, finishedOn, correlationId, websiteSizeInBytes, kind); - } - - /// Initializes a new instance of RestoreRequestInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// SAS URL to the container. - /// Name of a blob which contains the backup. - /// <code>true</code> if the restore operation can overwrite target app; otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an existing app. - /// Name of an app. - /// Collection of databases which should be restored. This list has to match the list of databases included in the backup. - /// - /// Changes a logic when restoring an app with custom domains. <code>true</code> to remove custom domains automatically. If <code>false</code>, custom domains are added to - /// the app's object when it is being restored, but that might fail due to conflicts during the operation. - /// - /// Ignore the databases and only restore the site content. - /// Specify app service plan that will own restored site. - /// Operation type. - /// <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. - /// App Service Environment name, if needed (only when restoring an app to an App Service Environment). - /// Kind of resource. - /// A new instance for mocking. - public static RestoreRequestInfo RestoreRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri storageAccountUri = null, string blobName = null, bool? canOverwrite = null, string siteName = null, IEnumerable databases = null, bool? ignoreConflictingHostNames = null, bool? ignoreDatabases = null, string appServicePlan = null, BackupRestoreOperationType? operationType = null, bool? adjustConnectionStrings = null, string hostingEnvironment = null, string kind = null) - { - databases ??= new List(); - - return new RestoreRequestInfo(id, name, resourceType, systemData, storageAccountUri, blobName, canOverwrite, siteName, databases?.ToList(), ignoreConflictingHostNames, ignoreDatabases, appServicePlan, operationType, adjustConnectionStrings, hostingEnvironment, kind); - } - - /// Initializes a new instance of CsmPublishingCredentialsPoliciesEntityData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// <code>true</code> to allow access to a publishing method; otherwise, <code>false</code>. - /// Kind of resource. - /// A new instance for mocking. - public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredentialsPoliciesEntityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? allow = null, string kind = null) - { - return new CsmPublishingCredentialsPoliciesEntityData(id, name, resourceType, systemData, allow, kind); - } - - /// Initializes a new instance of SiteAuthSettings. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// <code>true</code> if the Authentication / Authorization feature is enabled for the current app; otherwise, <code>false</code>. - /// - /// The RuntimeVersion of the Authentication / Authorization feature in use for the current app. - /// The setting in this value can control the behavior of certain features in the Authentication / Authorization module. - /// - /// The action to take when an unauthenticated client attempts to access the app. - /// - /// <code>true</code> to durably store platform-specific security tokens that are obtained during login flows; otherwise, <code>false</code>. - /// The default is <code>false</code>. - /// - /// - /// External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. - /// This is an advanced setting typically only needed by Windows Store application backends. - /// Note that URLs within the current domain are always implicitly allowed. - /// - /// - /// The default authentication provider to use when multiple providers are configured. - /// This setting is only needed if multiple providers are configured and the unauthenticated client - /// action is set to "RedirectToLoginPage". - /// - /// - /// The number of hours after session token expiration that a session token can be used to - /// call the token refresh API. The default is 72 hours. - /// - /// - /// The Client ID of this relying party application, known as the client_id. - /// This setting is required for enabling OpenID Connection authentication with Azure Active Directory or - /// other 3rd party OpenID Connect providers. - /// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - /// - /// - /// The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). - /// This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. - /// Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. - /// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - /// - /// The app setting name that contains the client secret of the relying party application. - /// - /// An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as - /// a replacement for the Client Secret. It is also optional. - /// - /// - /// The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. - /// When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. - /// This URI is a case-sensitive identifier for the token issuer. - /// More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html - /// - /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. - /// - /// Allowed audience values to consider when validating JWTs issued by - /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an - /// allowed audience, regardless of this setting. - /// - /// - /// Login parameters to send to the OpenID Connect authorization endpoint when - /// a user logs in. Each parameter must be in the form "key=value". - /// - /// Gets a JSON string containing the Azure AD Acl settings. - /// - /// The OpenID Connect Client ID for the Google web application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - /// - /// - /// The client secret associated with the Google web application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - /// - /// - /// The app setting name that contains the client secret associated with - /// the Google web application. - /// - /// - /// The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. - /// This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. - /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - /// - /// - /// The App ID of the Facebook app used for login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - /// - /// - /// The App Secret of the Facebook app used for Facebook Login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - /// - /// The app setting name that contains the app secret used for Facebook Login. - /// - /// The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. - /// This setting is optional. - /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - /// - /// - /// The Client Id of the GitHub app used for login. - /// This setting is required for enabling Github login - /// - /// - /// The Client Secret of the GitHub app used for Github Login. - /// This setting is required for enabling Github login. - /// - /// - /// The app setting name that contains the client secret of the Github - /// app used for GitHub Login. - /// - /// - /// The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. - /// This setting is optional - /// - /// - /// The OAuth 1.0a consumer key of the Twitter application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - /// - /// - /// The OAuth 1.0a consumer secret of the Twitter application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - /// - /// - /// The app setting name that contains the OAuth 1.0a consumer secret of the Twitter - /// application used for sign-in. - /// - /// - /// The OAuth 2.0 client ID that was created for the app used for authentication. - /// This setting is required for enabling Microsoft Account authentication. - /// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm - /// - /// - /// The OAuth 2.0 client secret that was created for the app used for authentication. - /// This setting is required for enabling Microsoft Account authentication. - /// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm - /// - /// - /// The app setting name containing the OAuth 2.0 client secret that was created for the - /// app used for authentication. - /// - /// - /// The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. - /// This setting is optional. If not specified, "wl.basic" is used as the default scope. - /// Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx - /// - /// - /// "true" if the auth config settings should be read from a file, - /// "false" otherwise - /// - /// - /// The path of the config file containing auth settings. - /// If the path is relative, base will the site's root directory. - /// - /// - /// The ConfigVersion of the Authentication / Authorization feature in use for the current app. - /// The setting in this value can control the behavior of the control plane for Authentication / Authorization. - /// - /// Kind of resource. - /// A new instance for mocking. - public static SiteAuthSettings SiteAuthSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null, string runtimeVersion = null, UnauthenticatedClientAction? unauthenticatedClientAction = null, bool? isTokenStoreEnabled = null, IEnumerable allowedExternalRedirectUrls = null, BuiltInAuthenticationProvider? defaultProvider = null, double? tokenRefreshExtensionHours = null, string clientId = null, string clientSecret = null, string clientSecretSettingName = null, string clientSecretCertificateThumbprintString = null, string issuer = null, bool? validateIssuer = null, IEnumerable allowedAudiences = null, IEnumerable additionalLoginParams = null, string aadClaimsAuthorization = null, string googleClientId = null, string googleClientSecret = null, string googleClientSecretSettingName = null, IEnumerable googleOAuthScopes = null, string facebookAppId = null, string facebookAppSecret = null, string facebookAppSecretSettingName = null, IEnumerable facebookOAuthScopes = null, string gitHubClientId = null, string gitHubClientSecret = null, string gitHubClientSecretSettingName = null, IEnumerable gitHubOAuthScopes = null, string twitterConsumerKey = null, string twitterConsumerSecret = null, string twitterConsumerSecretSettingName = null, string microsoftAccountClientId = null, string microsoftAccountClientSecret = null, string microsoftAccountClientSecretSettingName = null, IEnumerable microsoftAccountOAuthScopes = null, string isAuthFromFile = null, string authFilePath = null, string configVersion = null, string kind = null) - { - allowedExternalRedirectUrls ??= new List(); - allowedAudiences ??= new List(); - additionalLoginParams ??= new List(); - googleOAuthScopes ??= new List(); - facebookOAuthScopes ??= new List(); - gitHubOAuthScopes ??= new List(); - microsoftAccountOAuthScopes ??= new List(); - - return new SiteAuthSettings(id, name, resourceType, systemData, isEnabled, runtimeVersion, unauthenticatedClientAction, isTokenStoreEnabled, allowedExternalRedirectUrls?.ToList(), defaultProvider, tokenRefreshExtensionHours, clientId, clientSecret, clientSecretSettingName, clientSecretCertificateThumbprintString, issuer, validateIssuer, allowedAudiences?.ToList(), additionalLoginParams?.ToList(), aadClaimsAuthorization, googleClientId, googleClientSecret, googleClientSecretSettingName, googleOAuthScopes?.ToList(), facebookAppId, facebookAppSecret, facebookAppSecretSettingName, facebookOAuthScopes?.ToList(), gitHubClientId, gitHubClientSecret, gitHubClientSecretSettingName, gitHubOAuthScopes?.ToList(), twitterConsumerKey, twitterConsumerSecret, twitterConsumerSecretSettingName, microsoftAccountClientId, microsoftAccountClientSecret, microsoftAccountClientSecretSettingName, microsoftAccountOAuthScopes?.ToList(), isAuthFromFile, authFilePath, configVersion, kind); - } - - /// Initializes a new instance of SiteAuthSettingsV2. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The configuration settings of the platform of App Service Authentication/Authorization. - /// The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. - /// The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. - /// The configuration settings of the login flow of users using App Service Authentication/Authorization. - /// The configuration settings of the HTTP requests for authentication and authorization requests made against App Service Authentication/Authorization. - /// Kind of resource. - /// A new instance for mocking. - public static SiteAuthSettingsV2 SiteAuthSettingsV2(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AuthPlatform platform = null, GlobalValidation globalValidation = null, AppServiceIdentityProviders identityProviders = null, WebAppLoginInfo login = null, AppServiceHttpSettings httpSettings = null, string kind = null) - { - return new SiteAuthSettingsV2(id, name, resourceType, systemData, platform, globalValidation, identityProviders, login, httpSettings, kind); - } - - /// Initializes a new instance of AzureStoragePropertyDictionary. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Azure storage accounts. - /// Kind of resource. - /// A new instance for mocking. - public static AzureStoragePropertyDictionary AzureStoragePropertyDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) - { - properties ??= new Dictionary(); - - return new AzureStoragePropertyDictionary(id, name, resourceType, systemData, properties, kind); - } - - /// Initializes a new instance of ApiKeyVaultReferenceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// - /// - /// - /// - /// Managed service identity. - /// - /// - /// - /// Kind of resource. - /// A new instance for mocking. - public static ApiKeyVaultReferenceData ApiKeyVaultReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string reference = null, ResolveStatus? status = null, string vaultName = null, string secretName = null, string secretVersion = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string details = null, ConfigReferenceSource? source = null, string activeVersion = null, string kind = null) - { - return new ApiKeyVaultReferenceData(id, name, resourceType, systemData, reference, status, vaultName, secretName, secretVersion, identity, details, source, activeVersion, kind); - } - - /// Initializes a new instance of ConnectionStringDictionary. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Connection strings. - /// Kind of resource. - /// A new instance for mocking. - public static ConnectionStringDictionary ConnectionStringDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) - { - properties ??= new Dictionary(); - - return new ConnectionStringDictionary(id, name, resourceType, systemData, properties, kind); - } - - /// Initializes a new instance of SlotConfigNamesResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of connection string names. - /// List of application settings names. - /// List of external Azure storage account identifiers. - /// Kind of resource. - /// A new instance for mocking. - public static SlotConfigNamesResourceData SlotConfigNamesResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable connectionStringNames = null, IEnumerable appSettingNames = null, IEnumerable azureStorageConfigNames = null, string kind = null) - { - connectionStringNames ??= new List(); - appSettingNames ??= new List(); - azureStorageConfigNames ??= new List(); - - return new SlotConfigNamesResourceData(id, name, resourceType, systemData, connectionStringNames?.ToList(), appSettingNames?.ToList(), azureStorageConfigNames?.ToList(), kind); - } - - /// Initializes a new instance of SiteConfigurationSnapshotInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The time the snapshot was taken. - /// The id of the snapshot. - /// Kind of resource. - /// A new instance for mocking. - public static SiteConfigurationSnapshotInfo SiteConfigurationSnapshotInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? snapshotTakenOn = null, int? snapshotId = null, string kind = null) - { - return new SiteConfigurationSnapshotInfo(id, name, resourceType, systemData, snapshotTakenOn, snapshotId, kind); - } - - /// Initializes a new instance of ContinuousWebJobData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Job status. - /// Detailed status. - /// Log URL. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. - /// Error information. - /// Using SDK?. - /// Job settings. - /// Kind of resource. - /// A new instance for mocking. - public static ContinuousWebJobData ContinuousWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContinuousWebJobStatus? status = null, string detailedStatus = null, Uri logUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) - { - settings ??= new Dictionary(); - - return new ContinuousWebJobData(id, name, resourceType, systemData, status, detailedStatus, logUri, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); - } - - /// Initializes a new instance of WebAppDeploymentData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Deployment status. - /// Details about deployment status. - /// Who authored the deployment. - /// Who performed the deployment. - /// Author email. - /// Start time. - /// End time. - /// True if deployment is currently active, false if completed and null if not started. - /// Details on deployment. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppDeploymentData WebAppDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? status = null, string message = null, string author = null, string deployer = null, string authorEmail = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? isActive = null, string details = null, string kind = null) - { - return new WebAppDeploymentData(id, name, resourceType, systemData, status, message, author, deployer, authorEmail, startOn, endOn, isActive, details, kind); - } - - /// Initializes a new instance of MSDeployStatusData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Username of deployer. - /// Provisioning state. - /// Start time of deploy operation. - /// End time of deploy operation. - /// Whether the deployment operation has completed. - /// Kind of resource. - /// A new instance for mocking. - public static MSDeployStatusData MSDeployStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string deployer = null, MSDeployProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? isComplete = null, string kind = null) - { - return new MSDeployStatusData(id, name, resourceType, systemData, deployer, provisioningState, startOn, endOn, isComplete, kind); - } - - /// Initializes a new instance of WebAppMSDeploy. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Package URI. - /// SQL Connection String. - /// Database Type. - /// URI of MSDeploy Parameters file. Must not be set if SetParameters is used. - /// MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. - /// - /// Controls whether the MSDeploy operation skips the App_Data directory. - /// If set to <code>true</code>, the existing App_Data directory on the destination - /// will not be deleted, and any App_Data directory in the source will be ignored. - /// Setting is <code>false</code> by default. - /// - /// - /// Sets the AppOffline rule while the MSDeploy operation executes. - /// Setting is <code>false</code> by default. - /// - /// Kind of resource. - /// A new instance for mocking. - public static WebAppMSDeploy WebAppMSDeploy(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri packageUri = null, string connectionString = null, string dbType = null, Uri setParametersXmlFileUri = null, IDictionary setParameters = null, bool? skipAppData = null, bool? isAppOffline = null, string kind = null) - { - setParameters ??= new Dictionary(); - - return new WebAppMSDeploy(id, name, resourceType, systemData, packageUri, connectionString, dbType, setParametersXmlFileUri, setParameters, skipAppData, isAppOffline, kind); - } - - /// Initializes a new instance of WebAppMSDeployLog. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of log entry messages. - /// Kind of resource. - /// A new instance for mocking. - public static WebAppMSDeployLog WebAppMSDeployLog(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable entries = null, string kind = null) - { - entries ??= new List(); - - return new WebAppMSDeployLog(id, name, resourceType, systemData, entries?.ToList(), kind); - } - - /// Initializes a new instance of WebAppMSDeployLogEntry. - /// Timestamp of log entry. - /// Log entry type. - /// Log entry message. - /// A new instance for mocking. - public static WebAppMSDeployLogEntry WebAppMSDeployLogEntry(DateTimeOffset? time = null, WebAppMSDeployLogEntryType? entryType = null, string message = null) - { - return new WebAppMSDeployLogEntry(time, entryType, message); - } - - /// Initializes a new instance of FunctionEnvelopeData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Function App ID. - /// Script root path URI. - /// Script URI. - /// Config URI. - /// Test data URI. - /// Secrets file URI. - /// Function URI. - /// Config information. - /// File list. - /// Test data used when testing via the Azure Portal. - /// The invocation URL. - /// The function language. - /// Gets or sets a value indicating whether the function is disabled. - /// Kind of resource. - /// A new instance for mocking. - public static FunctionEnvelopeData FunctionEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string functionAppId = null, string scriptRootPathHref = null, string scriptHref = null, string configHref = null, string testDataHref = null, string secretsFileHref = null, string href = null, BinaryData config = null, IDictionary files = null, string testData = null, string invokeUrlTemplate = null, string language = null, bool? isDisabled = null, string kind = null) - { - files ??= new Dictionary(); - - return new FunctionEnvelopeData(id, name, resourceType, systemData, functionAppId, scriptRootPathHref, scriptHref, configHref, testDataHref, secretsFileHref, href, config, files, testData, invokeUrlTemplate, language, isDisabled, kind); - } - - /// Initializes a new instance of FunctionSecrets. - /// Secret key. - /// Trigger URL. - /// A new instance for mocking. - public static FunctionSecrets FunctionSecrets(string key = null, Uri triggerUri = null) - { - return new FunctionSecrets(key, triggerUri); - } - - /// Initializes a new instance of FunctionAppHostKeys. - /// Secret key. - /// Host level function keys. - /// System keys. - /// A new instance for mocking. - public static FunctionAppHostKeys FunctionAppHostKeys(string masterKey = null, IReadOnlyDictionary functionKeys = null, IReadOnlyDictionary systemKeys = null) - { - functionKeys ??= new Dictionary(); - systemKeys ??= new Dictionary(); - - return new FunctionAppHostKeys(masterKey, functionKeys, systemKeys); - } - - /// Initializes a new instance of HostNameBindingData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// App Service app name. - /// Fully qualified ARM domain resource URI. - /// Azure resource name. - /// Azure resource type. - /// Custom DNS record type. - /// Hostname type. - /// SSL type. - /// SSL certificate thumbprint. - /// Virtual IP address assigned to the hostname if IP based SSL is enabled. - /// Kind of resource. - /// A new instance for mocking. - public static HostNameBindingData HostNameBindingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string siteName = null, string domainId = null, string azureResourceName = null, AppServiceResourceType? azureResourceType = null, CustomHostNameDnsRecordType? customHostNameDnsRecordType = null, AppServiceHostNameType? hostNameType = null, HostNameBindingSslState? sslState = null, string thumbprintString = null, string virtualIP = null, string kind = null) - { - return new HostNameBindingData(id, name, resourceType, systemData, siteName, domainId, azureResourceName, azureResourceType, customHostNameDnsRecordType, hostNameType, sslState, thumbprintString, virtualIP, kind); - } - - /// Initializes a new instance of RelayServiceConnectionEntityData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// - /// - /// - /// - /// - /// Kind of resource. - /// A new instance for mocking. - public static RelayServiceConnectionEntityData RelayServiceConnectionEntityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string entityName = null, string entityConnectionString = null, string resourceConnectionString = null, string hostname = null, int? port = null, Uri biztalkUri = null, string kind = null) - { - return new RelayServiceConnectionEntityData(id, name, resourceType, systemData, entityName, entityConnectionString, resourceConnectionString, hostname, port, biztalkUri, kind); - } - - /// Initializes a new instance of WebSiteInstanceStatusData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Link to the GetStatusApi in Kudu. - /// Link to the Diagnose and Solve Portal. - /// Link to the console to web app instance. - /// Link to the console to web app instance. - /// Dictionary of <ContainerInfo>. - /// Kind of resource. - /// A new instance for mocking. - public static WebSiteInstanceStatusData WebSiteInstanceStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRuntimeState? state = null, Uri statusUri = null, Uri detectorUri = null, Uri consoleUri = null, string healthCheckUrlString = null, IDictionary containers = null, string kind = null) - { - containers ??= new Dictionary(); - - return new WebSiteInstanceStatusData(id, name, resourceType, systemData, state, statusUri, detectorUri, consoleUri, healthCheckUrlString, containers, kind); - } - - /// Initializes a new instance of ProcessInfoData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// ARM Identifier for deployment. - /// Deployment name. - /// HRef URI. - /// Minidump URI. - /// Is profile running?. - /// Is the IIS Profile running?. - /// IIS Profile timeout (seconds). - /// Parent process. - /// Child process list. - /// Thread list. - /// List of open files. - /// List of modules. - /// File name of this process. - /// Command line. - /// User name. - /// Handle count. - /// Module count. - /// Thread count. - /// Start time. - /// Total CPU time. - /// User CPU time. - /// Privileged CPU time. - /// Working set. - /// Peak working set. - /// Private memory size. - /// Virtual memory size. - /// Peak virtual memory usage. - /// Paged system memory. - /// Non-paged system memory. - /// Paged memory. - /// Peak paged memory. - /// Time stamp. - /// List of environment variables. - /// Is this the SCM site?. - /// Is this a Web Job?. - /// Description of process. - /// Kind of resource. - /// A new instance for mocking. - public static ProcessInfoData ProcessInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? identifier = null, string deploymentName = null, string href = null, string minidump = null, bool? isProfileRunning = null, bool? isIisProfileRunning = null, double? iisProfileTimeoutInSeconds = null, string parent = null, IEnumerable children = null, IEnumerable threads = null, IEnumerable openFileHandles = null, IEnumerable modules = null, string fileName = null, string commandLine = null, string userName = null, int? handleCount = null, int? moduleCount = null, int? threadCount = null, DateTimeOffset? startOn = null, string totalCpuTime = null, string userCpuTime = null, string privilegedCpuTime = null, long? workingSet = null, long? peakWorkingSet = null, long? privateMemory = null, long? virtualMemory = null, long? peakVirtualMemory = null, long? pagedSystemMemory = null, long? nonPagedSystemMemory = null, long? pagedMemory = null, long? peakPagedMemory = null, DateTimeOffset? timeStamp = null, IDictionary environmentVariables = null, bool? isScmSite = null, bool? isWebjob = null, string description = null, string kind = null) - { - children ??= new List(); - threads ??= new List(); - openFileHandles ??= new List(); - modules ??= new List(); - environmentVariables ??= new Dictionary(); - - return new ProcessInfoData(id, name, resourceType, systemData, identifier, deploymentName, href, minidump, isProfileRunning, isIisProfileRunning, iisProfileTimeoutInSeconds, parent, children?.ToList(), threads?.ToList(), openFileHandles?.ToList(), modules?.ToList(), fileName, commandLine, userName, handleCount, moduleCount, threadCount, startOn, totalCpuTime, userCpuTime, privilegedCpuTime, workingSet, peakWorkingSet, privateMemory, virtualMemory, peakVirtualMemory, pagedSystemMemory, nonPagedSystemMemory, pagedMemory, peakPagedMemory, timeStamp, environmentVariables, isScmSite, isWebjob, description, kind); - } - - /// Initializes a new instance of ProcessThreadInfo. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Site extension ID. - /// HRef URI. - /// Process URI. - /// Start address. - /// Current thread priority. - /// Thread priority level. - /// Base priority. - /// Start time. - /// Total processor time. - /// User processor time. - /// Thread state. - /// Wait reason. - /// Kind of resource. - /// A new instance for mocking. - public static ProcessThreadInfo ProcessThreadInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? identifier = null, string href = null, string process = null, string startAddress = null, int? currentPriority = null, string priorityLevel = null, int? basePriority = null, DateTimeOffset? startOn = null, string totalProcessorTime = null, string userProcessorTime = null, string state = null, string waitReason = null, string kind = null) - { - return new ProcessThreadInfo(id, name, resourceType, systemData, identifier, href, process, startAddress, currentPriority, priorityLevel, basePriority, startOn, totalProcessorTime, userProcessorTime, state, waitReason, kind); - } - - /// Initializes a new instance of ProcessModuleInfoData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Base address. Used as module identifier in ARM resource URI. - /// File name. - /// HRef URI. - /// File path. - /// Module memory size. - /// File version. - /// File description. - /// Product name. - /// Product version. - /// Is debug?. - /// Module language (locale). - /// Kind of resource. - /// A new instance for mocking. - public static ProcessModuleInfoData ProcessModuleInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string baseAddress = null, string fileName = null, string href = null, string filePath = null, int? moduleMemorySize = null, string fileVersion = null, string fileDescription = null, string product = null, string productVersion = null, bool? isDebug = null, string language = null, string kind = null) - { - return new ProcessModuleInfoData(id, name, resourceType, systemData, baseAddress, fileName, href, filePath, moduleMemorySize, fileVersion, fileDescription, product, productVersion, isDebug, language, kind); - } - - /// Initializes a new instance of SiteCloneability. - /// Name of app. - /// List of features enabled on app that prevent cloning. - /// - /// List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned - /// but the features in this list will not be set up on cloned app. - /// - /// List of blocking application characteristics. - /// A new instance for mocking. - public static SiteCloneability SiteCloneability(CloneAbilityResult? result = null, IEnumerable blockingFeatures = null, IEnumerable unsupportedFeatures = null, IEnumerable blockingCharacteristics = null) - { - blockingFeatures ??= new List(); - unsupportedFeatures ??= new List(); - blockingCharacteristics ??= new List(); - - return new SiteCloneability(result, blockingFeatures?.ToList(), unsupportedFeatures?.ToList(), blockingCharacteristics?.ToList()); - } - - /// Initializes a new instance of SiteCloneabilityCriterion. - /// Name of criterion. - /// Description of criterion. - /// A new instance for mocking. - public static SiteCloneabilityCriterion SiteCloneabilityCriterion(string name = null, string description = null) - { - return new SiteCloneabilityCriterion(name, description); - } - - /// Initializes a new instance of StorageMigrationContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// AzureFiles connection string. - /// AzureFiles share. - /// <code>true</code>if the app should be switched over; otherwise, <code>false</code>. - /// <code>true</code> if the app should be read only during copy operation; otherwise, <code>false</code>. - /// Kind of resource. - /// A new instance for mocking. - public static StorageMigrationContent StorageMigrationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string azurefilesConnectionString = null, string azurefilesShare = null, bool? switchSiteAfterMigration = null, bool? blockWriteAccessToSite = null, string kind = null) - { - return new StorageMigrationContent(id, name, resourceType, systemData, azurefilesConnectionString, azurefilesShare, switchSiteAfterMigration, blockWriteAccessToSite, kind); - } - - /// Initializes a new instance of StorageMigrationResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// When server starts the migration process, it will return an operation ID identifying that particular migration operation. - /// Kind of resource. - /// A new instance for mocking. - public static StorageMigrationResult StorageMigrationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string operationId = null, string kind = null) - { - return new StorageMigrationResult(id, name, resourceType, systemData, operationId, kind); - } - - /// Initializes a new instance of MigrateMySqlContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Connection string to the remote MySQL database. - /// The type of migration operation to be done. - /// Kind of resource. - /// A new instance for mocking. - public static MigrateMySqlContent MigrateMySqlContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string connectionString = null, MySqlMigrationType? migrationType = null, string kind = null) - { - return new MigrateMySqlContent(id, name, resourceType, systemData, connectionString, migrationType, kind); - } - - /// Initializes a new instance of MigrateMySqlStatusData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Status of the migration task. - /// Operation ID for the migration task. - /// True if the web app has in app MySql enabled. - /// Kind of resource. - /// A new instance for mocking. - public static MigrateMySqlStatusData MigrateMySqlStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServiceOperationStatus? migrationOperationStatus = null, string operationId = null, bool? isLocalMySqlEnabled = null, string kind = null) - { - return new MigrateMySqlStatusData(id, name, resourceType, systemData, migrationOperationStatus, operationId, isLocalMySqlEnabled, kind); - } - - /// Initializes a new instance of SwiftVirtualNetworkData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. - /// A flag that specifies if the scale unit this Web App is on supports Swift integration. - /// Kind of resource. - /// A new instance for mocking. - public static SwiftVirtualNetworkData SwiftVirtualNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier subnetResourceId = null, bool? isSwiftSupported = null, string kind = null) - { - return new SwiftVirtualNetworkData(id, name, resourceType, systemData, subnetResourceId, isSwiftSupported, kind); - } - - /// Initializes a new instance of NetworkFeatureData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Virtual Network name. - /// The Virtual Network summary view. - /// The Hybrid Connections summary view. - /// The Hybrid Connection V2 (Service Bus) view. - /// Kind of resource. - /// A new instance for mocking. - public static NetworkFeatureData NetworkFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string virtualNetworkName = null, AppServiceVirtualNetworkProperties virtualNetworkConnection = null, IEnumerable hybridConnections = null, IEnumerable hybridConnectionsV2 = null, string kind = null) - { - hybridConnections ??= new List(); - hybridConnectionsV2 ??= new List(); - - return new NetworkFeatureData(id, name, resourceType, systemData, virtualNetworkName, virtualNetworkConnection, hybridConnections?.ToList(), hybridConnectionsV2?.ToList(), kind); - } - - /// Initializes a new instance of WebAppNetworkTrace. - /// Local file path for the captured network trace file. - /// Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). - /// Detailed message of a network trace operation, e.g. error message in case of failure. - /// A new instance for mocking. - public static WebAppNetworkTrace WebAppNetworkTrace(string path = null, string status = null, string message = null) - { - return new WebAppNetworkTrace(path, status, message); - } - - /// Initializes a new instance of PerfMonResponseInfo. - /// The response code. - /// The message. - /// The performance monitor counters. - /// A new instance for mocking. - public static PerfMonResponseInfo PerfMonResponseInfo(string code = null, string message = null, PerfMonSet data = null) - { - return new PerfMonResponseInfo(code, message, data); - } - - /// Initializes a new instance of PerfMonSet. - /// Unique key name of the counter. - /// Start time of the period. - /// End time of the period. - /// Presented time grain. - /// Collection of workers that are active during this time. - /// A new instance for mocking. - public static PerfMonSet PerfMonSet(string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string timeGrain = null, IEnumerable values = null) - { - values ??= new List(); - - return new PerfMonSet(name, startOn, endOn, timeGrain, values?.ToList()); - } - - /// Initializes a new instance of PerfMonSample. - /// Point in time for which counter was measured. - /// Name of the server on which the measurement is made. - /// Value of counter at a certain time. - /// A new instance for mocking. - public static PerfMonSample PerfMonSample(DateTimeOffset? time = null, string instanceName = null, double? value = null) - { - return new PerfMonSample(time, instanceName, value); - } - - /// Initializes a new instance of SitePhpErrorLogFlag. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Local log_errors setting. - /// Master log_errors setting. - /// Local log_errors_max_len setting. - /// Master log_errors_max_len setting. - /// Kind of resource. - /// A new instance for mocking. - public static SitePhpErrorLogFlag SitePhpErrorLogFlag(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string localLogErrors = null, string masterLogErrors = null, string localLogErrorsMaxLength = null, string masterLogErrorsMaxLength = null, string kind = null) - { - return new SitePhpErrorLogFlag(id, name, resourceType, systemData, localLogErrors, masterLogErrors, localLogErrorsMaxLength, masterLogErrorsMaxLength, kind); - } - - /// Initializes a new instance of PremierAddOnData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Premier add on SKU. - /// Premier add on Product. - /// Premier add on Vendor. - /// Premier add on Marketplace publisher. - /// Premier add on Marketplace offer. - /// Kind of resource. - /// A new instance for mocking. - public static PremierAddOnData PremierAddOnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string sku = null, string product = null, string vendor = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) - { - tags ??= new Dictionary(); - - return new PremierAddOnData(id, name, resourceType, systemData, tags, location, sku, product, vendor, marketplacePublisher, marketplaceOffer, kind); - } - - /// Initializes a new instance of PremierAddOnPatchResource. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Premier add on SKU. - /// Premier add on Product. - /// Premier add on Vendor. - /// Premier add on Marketplace publisher. - /// Premier add on Marketplace offer. - /// Kind of resource. - /// A new instance for mocking. - public static PremierAddOnPatchResource PremierAddOnPatchResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sku = null, string product = null, string vendor = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) - { - return new PremierAddOnPatchResource(id, name, resourceType, systemData, sku, product, vendor, marketplacePublisher, marketplaceOffer, kind); - } - - /// Initializes a new instance of PrivateAccessData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Whether private access is enabled or not. - /// The Virtual Networks (and subnets) allowed to access the site privately. - /// Kind of resource. - /// A new instance for mocking. - public static PrivateAccessData PrivateAccessData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null, IEnumerable virtualNetworks = null, string kind = null) - { - virtualNetworks ??= new List(); - - return new PrivateAccessData(id, name, resourceType, systemData, isEnabled, virtualNetworks?.ToList(), kind); - } - - /// Initializes a new instance of PublicCertificateData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Public Certificate byte array. - /// Public Certificate Location. - /// Certificate Thumbprint. - /// Kind of resource. - /// A new instance for mocking. - public static PublicCertificateData PublicCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, byte[] blob = null, PublicCertificateLocation? publicCertificateLocation = null, string thumbprintString = null, string kind = null) - { - return new PublicCertificateData(id, name, resourceType, systemData, blob, publicCertificateLocation, thumbprintString, kind); - } - - /// Initializes a new instance of DeletedAppRestoreContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// ARM resource ID of the deleted app. Example: - /// /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} - /// - /// If true, deleted site configuration, in addition to content, will be restored. - /// - /// Point in time to restore the deleted app from, formatted as a DateTime string. - /// If unspecified, default value is the time that the app was deleted. - /// - /// If true, the snapshot is retrieved from DRSecondary endpoint. - /// Kind of resource. - /// A new instance for mocking. - public static DeletedAppRestoreContent DeletedAppRestoreContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier deletedSiteId = null, bool? recoverConfiguration = null, string snapshotTime = null, bool? useDRSecondary = null, string kind = null) - { - return new DeletedAppRestoreContent(id, name, resourceType, systemData, deletedSiteId, recoverConfiguration, snapshotTime, useDRSecondary, kind); - } - - /// Initializes a new instance of SnapshotRestoreRequest. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Point in time in which the app restore should be done, formatted as a DateTime string. - /// - /// Optional. Specifies the web app that snapshot contents will be retrieved from. - /// If empty, the targeted web app will be used as the source. - /// - /// If <code>true</code> the restore operation can overwrite source app; otherwise, <code>false</code>. - /// If true, site configuration, in addition to content, will be reverted. - /// - /// If true, custom hostname conflicts will be ignored when recovering to a target web app. - /// This setting is only necessary when RecoverConfiguration is enabled. - /// - /// If true, the snapshot is retrieved from DRSecondary endpoint. - /// Kind of resource. - /// A new instance for mocking. - public static SnapshotRestoreRequest SnapshotRestoreRequest(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string snapshotTime = null, SnapshotRecoverySource recoverySource = null, bool? canOverwrite = null, bool? recoverConfiguration = null, bool? ignoreConflictingHostNames = null, bool? useDRSecondary = null, string kind = null) - { - return new SnapshotRestoreRequest(id, name, resourceType, systemData, snapshotTime, recoverySource, canOverwrite, recoverConfiguration, ignoreConflictingHostNames, useDRSecondary, kind); - } - - /// Initializes a new instance of SiteExtensionInfoData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Site extension ID. - /// - /// Site extension type. - /// Summary description. - /// Detailed description. - /// Version information. - /// Extension URL. - /// Project URL. - /// Icon URL. - /// License URL. - /// Feed URL. - /// List of authors. - /// Installer command line parameters. - /// Published timestamp. - /// Count of downloads. - /// <code>true</code> if the local version is the latest version; <code>false</code> otherwise. - /// Local path. - /// Installed timestamp. - /// Provisioning state. - /// Site Extension comment. - /// Kind of resource. - /// A new instance for mocking. - public static SiteExtensionInfoData SiteExtensionInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string extensionId = null, string title = null, SiteExtensionType? extensionType = null, string summary = null, string description = null, string version = null, Uri extensionUri = null, Uri projectUri = null, Uri iconUri = null, Uri licenseUri = null, Uri feedUri = null, IEnumerable authors = null, string installerCommandLineParams = null, DateTimeOffset? publishedOn = null, int? downloadCount = null, bool? localIsLatestVersion = null, string localPath = null, DateTimeOffset? installedOn = null, string provisioningState = null, string comment = null, string kind = null) - { - authors ??= new List(); - - return new SiteExtensionInfoData(id, name, resourceType, systemData, extensionId, title, extensionType, summary, description, version, extensionUri, projectUri, iconUri, licenseUri, feedUri, authors?.ToList(), installerCommandLineParams, publishedOn, downloadCount, localIsLatestVersion, localPath, installedOn, provisioningState, comment, kind); - } - - /// Initializes a new instance of SlotDifference. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Level of the difference: Information, Warning or Error. - /// The type of the setting: General, AppSetting or ConnectionString. - /// Rule that describes how to process the setting difference during a slot swap. - /// Name of the setting. - /// Value of the setting in the current slot. - /// Value of the setting in the target slot. - /// Description of the setting difference. - /// Kind of resource. - /// A new instance for mocking. - public static SlotDifference SlotDifference(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string level = null, string settingType = null, string diffRule = null, string settingName = null, string valueInCurrentSlot = null, string valueInTargetSlot = null, string description = null, string kind = null) - { - return new SlotDifference(id, name, resourceType, systemData, level, settingType, diffRule, settingName, valueInCurrentSlot, valueInTargetSlot, description, kind); - } - - /// Initializes a new instance of SiteSourceControlData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Repository or source control URL. - /// Name of branch to use for deployment. - /// <code>true</code> to limit to manual integration; <code>false</code> to enable continuous integration (which configures webhooks into online repos like GitHub). - /// <code>true</code> if this is deployed via GitHub action. - /// <code>true</code> to enable deployment rollback; otherwise, <code>false</code>. - /// <code>true</code> for a Mercurial repository; <code>false</code> for a Git repository. - /// If GitHub Action is selected, than the associated configuration. - /// Kind of resource. - /// A new instance for mocking. - public static SiteSourceControlData SiteSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repoUri = null, string branch = null, bool? isManualIntegration = null, bool? isGitHubAction = null, bool? isDeploymentRollbackEnabled = null, bool? isMercurial = null, GitHubActionConfiguration gitHubActionConfiguration = null, string kind = null) - { - return new SiteSourceControlData(id, name, resourceType, systemData, repoUri, branch, isManualIntegration, isGitHubAction, isDeploymentRollbackEnabled, isMercurial, gitHubActionConfiguration, kind); - } - - /// Initializes a new instance of TriggeredWebJobData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Latest job run information. - /// History URL. - /// Scheduler Logs URL. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. - /// Error information. - /// Using SDK?. - /// Job settings. - /// Kind of resource. - /// A new instance for mocking. - public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) - { - settings ??= new Dictionary(); - - return new TriggeredWebJobData(id, name, resourceType, systemData, latestRun, historyUri, schedulerLogsUri, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); - } - - /// Initializes a new instance of TriggeredJobHistoryData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of triggered web job runs. - /// Kind of resource. - /// A new instance for mocking. - public static TriggeredJobHistoryData TriggeredJobHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable runs = null, string kind = null) - { - runs ??= new List(); - - return new TriggeredJobHistoryData(id, name, resourceType, systemData, runs?.ToList(), kind); - } - - /// Initializes a new instance of WebJobData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. - /// Error information. - /// Using SDK?. - /// Job settings. - /// Kind of resource. - /// A new instance for mocking. - public static WebJobData WebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) - { - settings ??= new Dictionary(); - - return new WebJobData(id, name, resourceType, systemData, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); - } - - /// Initializes a new instance of SiteConfigProperties. - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and version. - /// Xenon App Framework and version. - /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. - /// Request tracing expiration time. - /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. - /// Remote debugging version. - /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. - /// Flag to use Managed Identity Creds for ACR pull. - /// If using user managed identity, the user managed identity ClientId. - /// HTTP logs directory size limit. - /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. - /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. - /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. - /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. - /// Virtual applications. - /// Site load balancing. - /// This is work around for polymorphic types. - /// Site limits. - /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. - /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. - /// Cross-Origin Resource Sharing (CORS) settings. - /// Push endpoint settings. - /// Information about the formal API definition for the app. - /// Azure API management settings linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. - /// Managed Service Identity Id. - /// Explicit Managed Service Identity Id. - /// Identity to use for Key Vault Reference authentication. - /// IP security restrictions for main. - /// IP security restrictions for scm. - /// IP security restrictions for scm to use main. - /// Http20Enabled: configures a web site to allow clients to connect over http2.0. - /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. - /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - /// State of FTP / FTPS service. - /// - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - /// - /// Maximum number of workers that a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium Plans - /// - /// Health check path. - /// - /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but will instead call to the - /// runtime to get scale status. - /// - /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// - /// Number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - /// List of Azure Storage Accounts. - /// Property to allow or block all public traffic. - /// A new instance for mocking. - public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) - { - defaultDocuments ??= new List(); - appSettings ??= new List(); - connectionStrings ??= new List(); - handlerMappings ??= new List(); - virtualApplications ??= new List(); - experimentsRampUpRules ??= new List(); - ipSecurityRestrictions ??= new List(); - scmIPSecurityRestrictions ??= new List(); - azureStorageAccounts ??= new Dictionary(); - - return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess); - } - - /// Initializes a new instance of SiteConfigData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and version. - /// Xenon App Framework and version. - /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. - /// Request tracing expiration time. - /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. - /// Remote debugging version. - /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. - /// Flag to use Managed Identity Creds for ACR pull. - /// If using user managed identity, the user managed identity ClientId. - /// HTTP logs directory size limit. - /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. - /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. - /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. - /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. - /// Virtual applications. - /// Site load balancing. - /// This is work around for polymorphic types. - /// Site limits. - /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. - /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. - /// Cross-Origin Resource Sharing (CORS) settings. - /// Push endpoint settings. - /// Information about the formal API definition for the app. - /// Azure API management settings linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. - /// Managed Service Identity Id. - /// Explicit Managed Service Identity Id. - /// Identity to use for Key Vault Reference authentication. - /// IP security restrictions for main. - /// IP security restrictions for scm. - /// IP security restrictions for scm to use main. - /// Http20Enabled: configures a web site to allow clients to connect over http2.0. - /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. - /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - /// State of FTP / FTPS service. - /// - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - /// - /// Maximum number of workers that a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium Plans - /// - /// Health check path. - /// - /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but will instead call to the - /// runtime to get scale status. - /// - /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// - /// Number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - /// List of Azure Storage Accounts. - /// Property to allow or block all public traffic. - /// Kind of resource. - /// A new instance for mocking. - public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) - { - defaultDocuments ??= new List(); - appSettings ??= new List(); - connectionStrings ??= new List(); - handlerMappings ??= new List(); - virtualApplications ??= new List(); - experimentsRampUpRules ??= new List(); - ipSecurityRestrictions ??= new List(); - scmIPSecurityRestrictions ??= new List(); - azureStorageAccounts ??= new Dictionary(); - - return new SiteConfigData(id, name, resourceType, systemData, numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess, kind); - } - - /// Initializes a new instance of SiteLogsConfigData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Application logs configuration. - /// HTTP logs configuration. - /// Failed requests tracing configuration. - /// Detailed error messages configuration. - /// Kind of resource. - /// A new instance for mocking. - public static SiteLogsConfigData SiteLogsConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApplicationLogsConfig applicationLogs = null, AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = null, bool? isDetailedErrorMessagesEnabled = null, string kind = null) - { - return new SiteLogsConfigData(id, name, resourceType, systemData, applicationLogs, httpLogs, isFailedRequestsTracingEnabled != null ? new WebAppEnabledConfig(isFailedRequestsTracingEnabled) : null, isDetailedErrorMessagesEnabled != null ? new WebAppEnabledConfig(isDetailedErrorMessagesEnabled) : null, kind); - } - - /// Initializes a new instance of DiagnosticDetectorResponse. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Start time of the period. - /// End time of the period. - /// Flag representing Issue was detected. - /// Detector's definition. - /// Metrics provided by the detector. - /// List of Correlated events found by the detector. - /// Additional Data that detector wants to send. - /// Meta Data. - /// Kind of resource. - /// A new instance for mocking. - public static DiagnosticDetectorResponse DiagnosticDetectorResponse(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? issueDetected = null, DetectorDefinition detectorDefinition = null, IEnumerable metrics = null, IEnumerable abnormalTimePeriods = null, IEnumerable> data = null, DetectorDataSource dataSource = null, string kind = null) - { - metrics ??= new List(); - abnormalTimePeriods ??= new List(); - data ??= new List>(); - - return new DiagnosticDetectorResponse(id, name, resourceType, systemData, startOn, endOn, issueDetected, detectorDefinition, metrics?.ToList(), abnormalTimePeriods?.ToList(), data?.ToList(), dataSource != null ? new DetectorMetadata(dataSource) : null, kind); - } - } -} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs b/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs deleted file mode 100644 index d8f59ddde4c2..000000000000 --- a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -//This file is needed because we had to turn off the post processor which makes a bunch of types public. - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -[assembly: CodeGenSuppressType("ArmIdWrapper")] -[assembly: CodeGenSuppressType("AppServiceGithubToken")] -[assembly: CodeGenSuppressType("AppServiceResource")] -[assembly: CodeGenSuppressType("AppserviceGithubTokenRequest")] -[assembly: CodeGenSuppressType("CsmMoveResourceEnvelope")] -[assembly: CodeGenSuppressType("DefaultErrorResponse")] -[assembly: CodeGenSuppressType("DefaultErrorResponseError")] -[assembly: CodeGenSuppressType("DefaultErrorResponseErrorDetailsItem")] -[assembly: CodeGenSuppressType("ExtendedLocation")] -[assembly: CodeGenSuppressType("ManagedServiceIdentity")] -[assembly: CodeGenSuppressType("ManagedServiceIdentityTypeExtensions")] -[assembly: CodeGenSuppressType("ProxyOnlyResource")] -[assembly: CodeGenSuppressType("StaticSiteUserProvidedFunctionAppProperties")] -[assembly: CodeGenSuppressType("UserAssignedIdentity")] -[assembly: CodeGenSuppressType("ManagedServiceIdentityType")] -[assembly: CodeGenSuppressType("ArmAppServiceModelFactory")] - -namespace Azure.ResourceManager.AppService.Models -{ -#pragma warning disable SA1402 // File may only contain a single type - internal partial class AllowedAudiencesValidation { } - internal partial class ApiManagementConfig { } - internal partial class AppServiceApiDefinitionInfo { } - internal partial class AppServiceBlobStorageTokenStore { } - internal partial class AppServiceHttpSettingsRoutes { } - internal partial class AppServiceStaticWebAppsRegistration { } - internal partial class CsmOperationDescriptionProperties { } - internal partial class DetectorMetadata { } - internal partial class FileSystemTokenStore { } - internal partial class FrontEndConfiguration { } - internal partial class LoginRoutes { } - internal partial class LoginScopes { } - internal partial class PrivateLinkResourcesWrapper { } - internal partial class RoutingRuleExperiments { } - internal partial class WebAppEnabledConfig { } - internal partial class PrivateLinkResourcesWrapper { } -#pragma warning restore SA1402 // File may only contain a single type -} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index 1d2725aa48e0..421aaa55830a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -20,7 +20,6 @@ skip-csproj: true modelerfour: flatten-payloads: false deserialize-null-collection-as-null-value: true -unreferenced-types-handling: KeepAll # mgmt-debug: # show-serialized-names: true From 605338a5f7c9674736df9124f5ca4f93080cb35b Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 13:07:17 -0700 Subject: [PATCH 2/6] regen after removing temp workaround --- ...sourceManager.AppService.netstandard2.0.cs | 1 + .../src/Generated/ApiKeyVaultReferenceData.cs | 4 +- .../src/Generated/AppServicePlanData.cs | 4 +- .../Generated/ArmAppServiceModelFactory.cs | 3921 +++++++++++++++++ .../src/Generated/KubeEnvironmentData.cs | 4 +- .../ApiKeyVaultReferenceData.Serialization.cs | 4 +- .../AppServicePlanData.Serialization.cs | 4 +- .../KubeEnvironmentData.Serialization.cs | 4 +- ...PrivateEndpointConnection.Serialization.cs | 4 +- ...EnvelopeRemotePrivateEndpointConnection.cs | 4 +- .../Models/SitePatchInfo.Serialization.cs | 4 +- .../src/Generated/Models/SitePatchInfo.cs | 4 +- .../Models/StaticSiteData.Serialization.cs | 4 +- .../Models/WebSiteData.Serialization.cs | 8 +- .../src/Generated/StaticSiteData.cs | 4 +- .../src/Generated/WebSiteData.cs | 6 +- 16 files changed, 3953 insertions(+), 31 deletions(-) create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs diff --git a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs index e53fe36c5ce8..eb168999c058 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs @@ -5400,6 +5400,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.CertificateOrderContact CertificateOrderContact(string email = null, string nameFirst = null, string nameLast = null, string phone = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ConnectionStringDictionary ConnectionStringDictionary(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.ContinuousWebJobData ContinuousWebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus? status = default(Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus?), string detailedStatus = null, System.Uri logUri = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CsmOperationDescription CsmOperationDescription(string name = null, bool? isDataAction = default(bool?), Azure.ResourceManager.AppService.Models.CsmOperationDisplay display = null, string origin = null, Azure.ResourceManager.AppService.Models.ServiceSpecification csmOperationDescriptionServiceSpecification = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmOperationDisplay CsmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.AppService.CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredentialsPoliciesEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? allow = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmUsageQuota CsmUsageQuota(string unit = null, System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.AppService.Models.LocalizableString name = null) { throw null; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs index 6f4cee6aa39a..643d11e8851e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs @@ -37,7 +37,7 @@ public ApiKeyVaultReferenceData() /// /// /// Kind of resource. - internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string reference, ResolveStatus? status, string vaultName, string secretName, string secretVersion, ResourceManager.Models.ManagedServiceIdentity identity, string details, ConfigReferenceSource? source, string activeVersion, string kind) : base(id, name, resourceType, systemData) + internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string reference, ResolveStatus? status, string vaultName, string secretName, string secretVersion, ManagedServiceIdentity identity, string details, ConfigReferenceSource? source, string activeVersion, string kind) : base(id, name, resourceType, systemData) { Reference = reference; Status = status; @@ -62,7 +62,7 @@ internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceTy /// Gets or sets the secret version. public string SecretVersion { get; set; } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Gets or sets the details. public string Details { get; set; } /// Gets or sets the source. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs index 53c42c148ebf..c4e3c2d39558 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs @@ -64,7 +64,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. /// /// Kind of resource. - internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, Resources.Models.ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind) : base(id, name, resourceType, systemData, tags, location) + internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; ExtendedLocation = extendedLocation; @@ -96,7 +96,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res /// Description of a SKU for a scalable resource. public AppServiceSkuDescription Sku { get; set; } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Target worker tier assigned to the App Service plan. public string WorkerTierName { get; set; } /// App Service plan status. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs new file mode 100644 index 000000000000..87c034749a91 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs @@ -0,0 +1,3921 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Azure; +using Azure.Core; +using Azure.ResourceManager.AppService; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Model factory for models. + public static partial class ArmAppServiceModelFactory + { + /// Initializes a new instance of AppServiceCertificateOrderData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// State of the Key Vault secret. + /// Certificate distinguished name. + /// Domain verification token. + /// Duration in years (must be 1). + /// Certificate key size. + /// Certificate product type. + /// <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + /// Status of certificate order. + /// Current order status. + /// Signed certificate. + /// Last CSR that was created for this order. + /// Intermediate certificate. + /// Root certificate. + /// Current serial number of the certificate. + /// Certificate last issuance time. + /// Certificate expiration time. + /// <code>true</code> if private key is external; otherwise, <code>false</code>. + /// Reasons why App Service Certificate is not renewable at the current moment. + /// Time stamp when the certificate would be auto renewed next. + /// Contact info. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceCertificateOrderData AppServiceCertificateOrderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = null, int? keySize = null, CertificateProductType? productType = null, bool? isAutoRenew = null, ProvisioningState? provisioningState = null, CertificateOrderStatus? status = null, AppServiceCertificateDetails signedCertificate = null, string csr = null, AppServiceCertificateDetails intermediate = null, AppServiceCertificateDetails root = null, string serialNumber = null, DateTimeOffset? lastCertificateIssuedOn = null, DateTimeOffset? expireOn = null, bool? isPrivateKeyExternal = null, IEnumerable appServiceCertificateNotRenewableReasons = null, DateTimeOffset? nextAutoRenewTimeStamp = null, CertificateOrderContact contact = null, string kind = null) + { + tags ??= new Dictionary(); + certificates ??= new Dictionary(); + appServiceCertificateNotRenewableReasons ??= new List(); + + return new AppServiceCertificateOrderData(id, name, resourceType, systemData, tags, location, certificates, distinguishedName, domainVerificationToken, validityInYears, keySize, productType, isAutoRenew, provisioningState, status, signedCertificate, csr, intermediate, root, serialNumber, lastCertificateIssuedOn, expireOn, isPrivateKeyExternal, appServiceCertificateNotRenewableReasons?.ToList(), nextAutoRenewTimeStamp, contact, kind); + } + + /// Initializes a new instance of AppServiceCertificateProperties. + /// Key Vault resource Id. + /// Key Vault secret name. + /// Status of the Key Vault secret. + /// A new instance for mocking. + public static AppServiceCertificateProperties AppServiceCertificateProperties(ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null) + { + return new AppServiceCertificateProperties(keyVaultId, keyVaultSecretName, provisioningState); + } + + /// Initializes a new instance of AppServiceCertificateDetails. + /// Certificate Version. + /// Certificate Serial Number. + /// Certificate Thumbprint. + /// Certificate Subject. + /// Date Certificate is valid from. + /// Date Certificate is valid to. + /// Certificate Signature algorithm. + /// Certificate Issuer. + /// Raw certificate data. + /// A new instance for mocking. + public static AppServiceCertificateDetails AppServiceCertificateDetails(int? version = null, string serialNumber = null, string thumbprintString = null, string subject = null, DateTimeOffset? notBefore = null, DateTimeOffset? notAfter = null, string signatureAlgorithm = null, string issuer = null, string rawData = null) + { + return new AppServiceCertificateDetails(version, serialNumber, thumbprintString, subject, notBefore, notAfter, signatureAlgorithm, issuer, rawData); + } + + /// Initializes a new instance of CertificateOrderContact. + /// + /// + /// + /// + /// A new instance for mocking. + public static CertificateOrderContact CertificateOrderContact(string email = null, string nameFirst = null, string nameLast = null, string phone = null) + { + return new CertificateOrderContact(email, nameFirst, nameLast, phone); + } + + /// Initializes a new instance of AppServiceCertificateOrderPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// State of the Key Vault secret. + /// Certificate distinguished name. + /// Domain verification token. + /// Duration in years (must be 1). + /// Certificate key size. + /// Certificate product type. + /// <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + /// Status of certificate order. + /// Current order status. + /// Signed certificate. + /// Last CSR that was created for this order. + /// Intermediate certificate. + /// Root certificate. + /// Current serial number of the certificate. + /// Certificate last issuance time. + /// Certificate expiration time. + /// <code>true</code> if private key is external; otherwise, <code>false</code>. + /// Reasons why App Service Certificate is not renewable at the current moment. + /// Time stamp when the certificate would be auto renewed next. + /// Contact info. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceCertificateOrderPatch AppServiceCertificateOrderPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = null, int? keySize = null, CertificateProductType? productType = null, bool? isAutoRenew = null, ProvisioningState? provisioningState = null, CertificateOrderStatus? status = null, AppServiceCertificateDetails signedCertificate = null, string csr = null, AppServiceCertificateDetails intermediate = null, AppServiceCertificateDetails root = null, string serialNumber = null, DateTimeOffset? lastCertificateIssuanceOn = null, DateTimeOffset? expireOn = null, bool? isPrivateKeyExternal = null, IEnumerable appServiceCertificateNotRenewableReasons = null, DateTimeOffset? nextAutoRenewalTimeStamp = null, CertificateOrderContact contact = null, string kind = null) + { + certificates ??= new Dictionary(); + appServiceCertificateNotRenewableReasons ??= new List(); + + return new AppServiceCertificateOrderPatch(id, name, resourceType, systemData, certificates, distinguishedName, domainVerificationToken, validityInYears, keySize, productType, isAutoRenew, provisioningState, status, signedCertificate, csr, intermediate, root, serialNumber, lastCertificateIssuanceOn, expireOn, isPrivateKeyExternal, appServiceCertificateNotRenewableReasons?.ToList(), nextAutoRenewalTimeStamp, contact, kind); + } + + /// Initializes a new instance of AppServiceCertificateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Key Vault resource Id. + /// Key Vault secret name. + /// Status of the Key Vault secret. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceCertificateData AppServiceCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null, string kind = null) + { + tags ??= new Dictionary(); + + return new AppServiceCertificateData(id, name, resourceType, systemData, tags, location, keyVaultId, keyVaultSecretName, provisioningState, kind); + } + + /// Initializes a new instance of AppServiceCertificatePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Key Vault resource Id. + /// Key Vault secret name. + /// Status of the Key Vault secret. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceCertificatePatch AppServiceCertificatePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null, string kind = null) + { + return new AppServiceCertificatePatch(id, name, resourceType, systemData, keyVaultId, keyVaultSecretName, provisioningState, kind); + } + + /// Initializes a new instance of ReissueCertificateOrderContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Certificate Key Size. + /// Delay in hours to revoke existing certificate after the new certificate is issued. + /// Csr to be used for re-key operation. + /// Should we change the ASC type (from managed private key to external private key and vice versa). + /// Kind of resource. + /// A new instance for mocking. + public static ReissueCertificateOrderContent ReissueCertificateOrderContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? keySize = null, int? delayExistingRevokeInHours = null, string csr = null, bool? isPrivateKeyExternal = null, string kind = null) + { + return new ReissueCertificateOrderContent(id, name, resourceType, systemData, keySize, delayExistingRevokeInHours, csr, isPrivateKeyExternal, kind); + } + + /// Initializes a new instance of RenewCertificateOrderContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Certificate Key Size. + /// Csr to be used for re-key operation. + /// Should we change the ASC type (from managed private key to external private key and vice versa). + /// Kind of resource. + /// A new instance for mocking. + public static RenewCertificateOrderContent RenewCertificateOrderContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? keySize = null, string csr = null, bool? isPrivateKeyExternal = null, string kind = null) + { + return new RenewCertificateOrderContent(id, name, resourceType, systemData, keySize, csr, isPrivateKeyExternal, kind); + } + + /// Initializes a new instance of SiteSeal. + /// HTML snippet. + /// is null. + /// A new instance for mocking. + public static SiteSeal SiteSeal(string html = null) + { + if (html == null) + { + throw new ArgumentNullException(nameof(html)); + } + + return new SiteSeal(html); + } + + /// Initializes a new instance of CertificateOrderAction. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Action type. + /// Time at which the certificate action was performed. + /// Kind of resource. + /// A new instance for mocking. + public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null, string kind = null) + { + return new CertificateOrderAction(id, name, resourceType, systemData, actionType, createdOn, kind); + } + + /// Initializes a new instance of AppServiceCertificateEmail. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Email id. + /// Time stamp. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null, string kind = null) + { + return new AppServiceCertificateEmail(id, name, resourceType, systemData, emailId, timeStamp, kind); + } + + /// Initializes a new instance of AppServiceDetectorData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// metadata for the detector. + /// Data Set. + /// Indicates status of the most severe insight. + /// Additional configuration for different data providers to be used by the UI. + /// Suggested utterances where the detector can be applicable. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceDetectorData AppServiceDetectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DetectorInfo metadata = null, IEnumerable dataset = null, AppServiceStatusInfo status = null, IEnumerable dataProvidersMetadata = null, QueryUtterancesResults suggestedUtterances = null, string kind = null) + { + dataset ??= new List(); + dataProvidersMetadata ??= new List(); + + return new AppServiceDetectorData(id, name, resourceType, systemData, metadata, dataset?.ToList(), status, dataProvidersMetadata?.ToList(), suggestedUtterances, kind); + } + + /// Initializes a new instance of DetectorInfo. + /// Id of detector. + /// Name of detector. + /// Short description of the detector and its purpose. + /// Author of the detector. + /// Problem category. This serves for organizing group for detectors. + /// List of Support Topics for which this detector is enabled. + /// Analysis Types for which this detector should apply to. + /// Whether this detector is an Analysis Detector or not. + /// Defines score of a detector to power ML based matching. + /// A new instance for mocking. + public static DetectorInfo DetectorInfo(string id = null, string name = null, string description = null, string author = null, string category = null, IEnumerable supportTopicList = null, IEnumerable analysisType = null, DetectorType? detectorType = null, float? score = null) + { + supportTopicList ??= new List(); + analysisType ??= new List(); + + return new DetectorInfo(id, name, description, author, category, supportTopicList?.ToList(), analysisType?.ToList(), detectorType, score); + } + + /// Initializes a new instance of DetectorSupportTopic. + /// Support Topic Id. + /// Unique resource Id. + /// A new instance for mocking. + public static DetectorSupportTopic DetectorSupportTopic(string id = null, ResourceIdentifier pesId = null) + { + return new DetectorSupportTopic(id, pesId); + } + + /// Initializes a new instance of DataProviderMetadata. + /// + /// Settings for the data provider. + /// A new instance for mocking. + public static DataProviderMetadata DataProviderMetadata(string providerName = null, IEnumerable propertyBag = null) + { + propertyBag ??= new List(); + + return new DataProviderMetadata(providerName, propertyBag?.ToList()); + } + + /// Initializes a new instance of DataProviderKeyValuePair. + /// + /// Any object. + /// A new instance for mocking. + public static DataProviderKeyValuePair DataProviderKeyValuePair(string key = null, BinaryData value = null) + { + return new DataProviderKeyValuePair(key, value); + } + + /// Initializes a new instance of CsmOperationDescription. + /// + /// + /// Meta data about operation used for display in portal. + /// + /// Properties available for a Microsoft.Web resource provider operation. + /// A new instance for mocking. + public static CsmOperationDescription CsmOperationDescription(string name = null, bool? isDataAction = null, CsmOperationDisplay display = null, string origin = null, ServiceSpecification csmOperationDescriptionServiceSpecification = null) + { + return new CsmOperationDescription(name, isDataAction, display, origin, csmOperationDescriptionServiceSpecification != null ? new CsmOperationDescriptionProperties(csmOperationDescriptionServiceSpecification) : null); + } + + /// Initializes a new instance of CsmOperationDisplay. + /// + /// + /// + /// + /// A new instance for mocking. + public static CsmOperationDisplay CsmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) + { + return new CsmOperationDisplay(provider, resource, operation, description); + } + + /// Initializes a new instance of ServiceSpecification. + /// + /// + /// A new instance for mocking. + public static ServiceSpecification ServiceSpecification(IEnumerable metricSpecifications = null, IEnumerable logSpecifications = null) + { + metricSpecifications ??= new List(); + logSpecifications ??= new List(); + + return new ServiceSpecification(metricSpecifications?.ToList(), logSpecifications?.ToList()); + } + + /// Initializes a new instance of MetricSpecification. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MetricSpecification MetricSpecification(string name = null, string displayName = null, string displayDescription = null, string unit = null, string aggregationType = null, bool? isInstanceLevelAggregationSupported = null, bool? isRegionalMdmAccountEnabled = null, string sourceMdmAccount = null, string sourceMdmNamespace = null, string metricFilterPattern = null, bool? fillGapWithZero = null, bool? isInternal = null, IEnumerable dimensions = null, string category = null, IEnumerable availabilities = null, IEnumerable supportedTimeGrainTypes = null, IEnumerable supportedAggregationTypes = null) + { + dimensions ??= new List(); + availabilities ??= new List(); + supportedTimeGrainTypes ??= new List(); + supportedAggregationTypes ??= new List(); + + return new MetricSpecification(name, displayName, displayDescription, unit, aggregationType, isInstanceLevelAggregationSupported, isRegionalMdmAccountEnabled, sourceMdmAccount, sourceMdmNamespace, metricFilterPattern, fillGapWithZero, isInternal, dimensions?.ToList(), category, availabilities?.ToList(), supportedTimeGrainTypes?.ToList(), supportedAggregationTypes?.ToList()); + } + + /// Initializes a new instance of MetricDimension. + /// + /// + /// + /// + /// A new instance for mocking. + public static MetricDimension MetricDimension(string name = null, string displayName = null, string internalName = null, bool? isToBeExportedForShoebox = null) + { + return new MetricDimension(name, displayName, internalName, isToBeExportedForShoebox); + } + + /// Initializes a new instance of MetricAvailability. + /// + /// + /// A new instance for mocking. + public static MetricAvailability MetricAvailability(string timeGrain = null, TimeSpan? blobDuration = null) + { + return new MetricAvailability(timeGrain, blobDuration); + } + + /// Initializes a new instance of LogSpecification. + /// + /// + /// + /// + /// A new instance for mocking. + public static LogSpecification LogSpecification(string name = null, string displayName = null, TimeSpan? blobDuration = null, string logFilterPattern = null) + { + return new LogSpecification(name, displayName, blobDuration, logFilterPattern); + } + + /// Initializes a new instance of DomainAvailabilityCheckResult. + /// Name of the domain. + /// <code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>. + /// Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything. + /// A new instance for mocking. + public static DomainAvailabilityCheckResult DomainAvailabilityCheckResult(string name = null, bool? isAvailable = null, AppServiceDomainType? domainType = null) + { + return new DomainAvailabilityCheckResult(name, isAvailable, domainType); + } + + /// Initializes a new instance of AppServiceDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Administrative contact. + /// Billing contact. + /// Registrant contact. + /// Technical contact. + /// Domain registration status. + /// Domain provisioning state. + /// Name servers. + /// <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + /// Domain creation timestamp. + /// Domain expiration timestamp. + /// Timestamp when the domain was renewed last time. + /// <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + /// + /// <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and + /// it is hosted on name servers Azure has programmatic access to. + /// + /// All hostnames derived from the domain and assigned to Azure resources. + /// Legal agreement consent. + /// Reasons why domain is not renewable. + /// Current DNS type. + /// Azure DNS Zone to use. + /// Target DNS type (would be used for migration). + /// + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceDomainData AppServiceDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RegistrationContactInfo contactAdmin = null, RegistrationContactInfo contactBilling = null, RegistrationContactInfo contactRegistrant = null, RegistrationContactInfo contactTech = null, AppServiceDomainStatus? registrationStatus = null, ProvisioningState? provisioningState = null, IEnumerable nameServers = null, bool? isDomainPrivacyEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, DateTimeOffset? lastRenewedOn = null, bool? isAutoRenew = null, bool? isDnsRecordManagementReady = null, IEnumerable managedHostNames = null, DomainPurchaseConsent consent = null, IEnumerable domainNotRenewableReasons = null, AppServiceDnsType? dnsType = null, string dnsZoneId = null, AppServiceDnsType? targetDnsType = null, string authCode = null, string kind = null) + { + tags ??= new Dictionary(); + nameServers ??= new List(); + managedHostNames ??= new List(); + domainNotRenewableReasons ??= new List(); + + return new AppServiceDomainData(id, name, resourceType, systemData, tags, location, contactAdmin, contactBilling, contactRegistrant, contactTech, registrationStatus, provisioningState, nameServers?.ToList(), isDomainPrivacyEnabled, createdOn, expireOn, lastRenewedOn, isAutoRenew, isDnsRecordManagementReady, managedHostNames?.ToList(), consent, domainNotRenewableReasons?.ToList(), dnsType, dnsZoneId, targetDnsType, authCode, kind); + } + + /// Initializes a new instance of AppServiceHostName. + /// Name of the hostname. + /// List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager. + /// Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. + /// Type of the Azure resource the hostname is assigned to. + /// Type of the DNS record. + /// Type of the hostname. + /// A new instance for mocking. + public static AppServiceHostName AppServiceHostName(string name = null, IEnumerable siteNames = null, string azureResourceName = null, AppServiceResourceType? azureResourceType = null, CustomHostNameDnsRecordType? customHostNameDnsRecordType = null, AppServiceHostNameType? hostNameType = null) + { + siteNames ??= new List(); + + return new AppServiceHostName(name, siteNames?.ToList(), azureResourceName, azureResourceType, customHostNameDnsRecordType, hostNameType); + } + + /// Initializes a new instance of DomainControlCenterSsoRequestInfo. + /// URL where the single sign-on request is to be made. + /// Post parameter key. + /// Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. + /// A new instance for mocking. + public static DomainControlCenterSsoRequestInfo DomainControlCenterSsoRequestInfo(Uri uri = null, string postParameterKey = null, string postParameterValue = null) + { + return new DomainControlCenterSsoRequestInfo(uri, postParameterKey, postParameterValue); + } + + /// Initializes a new instance of AppServiceDomainPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Administrative contact. + /// Billing contact. + /// Registrant contact. + /// Technical contact. + /// Domain registration status. + /// Domain provisioning state. + /// Name servers. + /// <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + /// Domain creation timestamp. + /// Domain expiration timestamp. + /// Timestamp when the domain was renewed last time. + /// <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + /// + /// <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and + /// it is hosted on name servers Azure has programmatic access to. + /// + /// All hostnames derived from the domain and assigned to Azure resources. + /// Legal agreement consent. + /// Reasons why domain is not renewable. + /// Current DNS type. + /// Azure DNS Zone to use. + /// Target DNS type (would be used for migration). + /// + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceDomainPatch AppServiceDomainPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RegistrationContactInfo contactAdmin = null, RegistrationContactInfo contactBilling = null, RegistrationContactInfo contactRegistrant = null, RegistrationContactInfo contactTech = null, AppServiceDomainStatus? registrationStatus = null, ProvisioningState? provisioningState = null, IEnumerable nameServers = null, bool? isDomainPrivacyEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, DateTimeOffset? lastRenewedOn = null, bool? isAutoRenew = null, bool? isReadyForDnsRecordManagement = null, IEnumerable managedHostNames = null, DomainPurchaseConsent consent = null, IEnumerable domainNotRenewableReasons = null, AppServiceDnsType? dnsType = null, string dnsZoneId = null, AppServiceDnsType? targetDnsType = null, string authCode = null, string kind = null) + { + nameServers ??= new List(); + managedHostNames ??= new List(); + domainNotRenewableReasons ??= new List(); + + return new AppServiceDomainPatch(id, name, resourceType, systemData, contactAdmin, contactBilling, contactRegistrant, contactTech, registrationStatus, provisioningState, nameServers?.ToList(), isDomainPrivacyEnabled, createdOn, expireOn, lastRenewedOn, isAutoRenew, isReadyForDnsRecordManagement, managedHostNames?.ToList(), consent, domainNotRenewableReasons?.ToList(), dnsType, dnsZoneId, targetDnsType, authCode, kind); + } + + /// Initializes a new instance of DomainOwnershipIdentifierData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Ownership Id. + /// Kind of resource. + /// A new instance for mocking. + public static DomainOwnershipIdentifierData DomainOwnershipIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ownershipId = null, string kind = null) + { + return new DomainOwnershipIdentifierData(id, name, resourceType, systemData, ownershipId, kind); + } + + /// Initializes a new instance of TopLevelDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>. + /// Kind of resource. + /// A new instance for mocking. + public static TopLevelDomainData TopLevelDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isDomainPrivacySupported = null, string kind = null) + { + return new TopLevelDomainData(id, name, resourceType, systemData, isDomainPrivacySupported, kind); + } + + /// Initializes a new instance of TldLegalAgreement. + /// Unique identifier for the agreement. + /// Agreement title. + /// Agreement details. + /// URL where a copy of the agreement details is hosted. + /// A new instance for mocking. + public static TldLegalAgreement TldLegalAgreement(string agreementKey = null, string title = null, string content = null, Uri uri = null) + { + return new TldLegalAgreement(agreementKey, title, content, uri); + } + + /// Initializes a new instance of AppServiceEnvironmentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state of the App Service Environment. + /// Current status of the App Service Environment. + /// Description of the Virtual Network. + /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. + /// Front-end VM size, e.g. "Medium", "Large". + /// Number of front-end instances. + /// Number of IP SSL addresses reserved for the App Service Environment. + /// DNS suffix of the App Service Environment. + /// Maximum number of VMs in the App Service Environment. + /// Scale factor for front-ends. + /// + /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available + /// (most likely because NSG blocked the incoming traffic). + /// + /// Custom settings for changing the behavior of the App Service Environment. + /// User added ip ranges to whitelist on ASE db. + /// Flag that displays whether an ASE has linux workers or not. + /// Dedicated Host Count. + /// Whether or not this App Service Environment is zone-redundant. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + { + tags ??= new Dictionary(); + clusterSettings ??= new List(); + userWhitelistedIPRanges ??= new List(); + + return new AppServiceEnvironmentData(id, name, resourceType, systemData, tags, location, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind); + } + + /// Initializes a new instance of AppServiceEnvironmentProperties. + /// Provisioning state of the App Service Environment. + /// Current status of the App Service Environment. + /// Description of the Virtual Network. + /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. + /// Front-end VM size, e.g. "Medium", "Large". + /// Number of front-end instances. + /// Number of IP SSL addresses reserved for the App Service Environment. + /// DNS suffix of the App Service Environment. + /// Maximum number of VMs in the App Service Environment. + /// Scale factor for front-ends. + /// + /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available + /// (most likely because NSG blocked the incoming traffic). + /// + /// Custom settings for changing the behavior of the App Service Environment. + /// User added ip ranges to whitelist on ASE db. + /// Flag that displays whether an ASE has linux workers or not. + /// Dedicated Host Count. + /// Whether or not this App Service Environment is zone-redundant. + /// A new instance for mocking. + public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null) + { + clusterSettings ??= new List(); + userWhitelistedIPRanges ??= new List(); + + return new AppServiceEnvironmentProperties(provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant); + } + + /// Initializes a new instance of AppServiceVirtualNetworkProfile. + /// Resource id of the Virtual Network. + /// Name of the Virtual Network (read-only). + /// Resource type of the Virtual Network (read-only). + /// Subnet within the Virtual Network. + /// A new instance for mocking. + public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string subnet = null) + { + return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet); + } + + /// Initializes a new instance of AppServiceEnvironmentPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the App Service Environment. + /// Current status of the App Service Environment. + /// Description of the Virtual Network. + /// Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. + /// Front-end VM size, e.g. "Medium", "Large". + /// Number of front-end instances. + /// Number of IP SSL addresses reserved for the App Service Environment. + /// DNS suffix of the App Service Environment. + /// Maximum number of VMs in the App Service Environment. + /// Scale factor for front-ends. + /// + /// <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available + /// (most likely because NSG blocked the incoming traffic). + /// + /// Custom settings for changing the behavior of the App Service Environment. + /// User added ip ranges to whitelist on ASE db. + /// Flag that displays whether an ASE has linux workers or not. + /// Dedicated Host Count. + /// Whether or not this App Service Environment is zone-redundant. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + { + clusterSettings ??= new List(); + userWhitelistedIPRanges ??= new List(); + + return new AppServiceEnvironmentPatch(id, name, resourceType, systemData, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind); + } + + /// Initializes a new instance of StampCapacity. + /// Name of the stamp. + /// Available capacity (# of machines, bytes of storage etc...). + /// Total capacity (# of machines, bytes of storage etc...). + /// Name of the unit. + /// Shared/dedicated workers. + /// Size of the machines. + /// + /// Size ID of machines: + /// 0 - Small + /// 1 - Medium + /// 2 - Large + /// + /// + /// If <code>true</code>, it includes basic apps. + /// Basic apps are not used for capacity allocation. + /// + /// <code>true</code> if capacity is applicable for all apps; otherwise, <code>false</code>. + /// Shared or Dedicated. + /// Is this a linux stamp capacity. + /// A new instance for mocking. + public static StampCapacity StampCapacity(string name = null, long? availableCapacity = null, long? totalCapacity = null, string unit = null, ComputeModeOption? computeMode = null, WorkerSizeOption? workerSize = null, int? workerSizeId = null, bool? excludeFromCapacityAllocation = null, bool? isApplicableForAllComputeModes = null, string siteMode = null, bool? isLinux = null) + { + return new StampCapacity(name, availableCapacity, totalCapacity, unit, computeMode, workerSize, workerSizeId, excludeFromCapacityAllocation, isApplicableForAllComputeModes, siteMode, isLinux); + } + + /// Initializes a new instance of AppServiceEnvironmentAddressResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Main public virtual IP. + /// Virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. + /// IP addresses appearing on outbound connections. + /// Additional virtual IPs. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IPAddress serviceIPAddress = null, IPAddress internalIPAddress = null, IEnumerable outboundIPAddresses = null, IEnumerable virtualIPMappings = null, string kind = null) + { + outboundIPAddresses ??= new List(); + virtualIPMappings ??= new List(); + + return new AppServiceEnvironmentAddressResult(id, name, resourceType, systemData, serviceIPAddress, internalIPAddress, outboundIPAddresses?.ToList(), virtualIPMappings?.ToList(), kind); + } + + /// Initializes a new instance of AseV3NetworkingConfigurationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// + /// Property to enable and disable new private endpoint connection creation on ASE. + /// Kind of resource. + /// A new instance for mocking. + public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, string kind = null) + { + windowsOutboundIPAddresses ??= new List(); + linuxOutboundIPAddresses ??= new List(); + externalInboundIPAddresses ??= new List(); + internalInboundIPAddresses ??= new List(); + + return new AseV3NetworkingConfigurationData(id, name, resourceType, systemData, windowsOutboundIPAddresses?.ToList(), linuxOutboundIPAddresses?.ToList(), externalInboundIPAddresses?.ToList(), internalInboundIPAddresses?.ToList(), allowNewPrivateEndpointConnections, kind); + } + + /// Initializes a new instance of HostingEnvironmentDiagnostics. + /// Name/identifier of the diagnostics. + /// Diagnostics output. + /// A new instance for mocking. + public static HostingEnvironmentDiagnostics HostingEnvironmentDiagnostics(string name = null, string diagnosticsOutput = null) + { + return new HostingEnvironmentDiagnostics(name, diagnosticsOutput); + } + + /// Initializes a new instance of InboundEnvironmentEndpoint. + /// Short text describing the purpose of the network traffic. + /// The IP addresses that network traffic will originate from in cidr notation. + /// The ports that network traffic will arrive to the App Service Environment at. + /// A new instance for mocking. + public static InboundEnvironmentEndpoint InboundEnvironmentEndpoint(string description = null, IEnumerable endpoints = null, IEnumerable ports = null) + { + endpoints ??= new List(); + ports ??= new List(); + + return new InboundEnvironmentEndpoint(description, endpoints?.ToList(), ports?.ToList()); + } + + /// Initializes a new instance of AppServiceWorkerPoolData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of a SKU for a scalable resource. + /// Worker size ID for referencing this worker pool. + /// Shared or dedicated app hosting. + /// VM size of the worker pool instances. + /// Number of instances in the worker pool. + /// Names of all instances in the worker pool (read only). + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceWorkerPoolData AppServiceWorkerPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServiceSkuDescription sku = null, int? workerSizeId = null, ComputeModeOption? computeMode = null, string workerSize = null, int? workerCount = null, IEnumerable instanceNames = null, string kind = null) + { + instanceNames ??= new List(); + + return new AppServiceWorkerPoolData(id, name, resourceType, systemData, sku, workerSizeId, computeMode, workerSize, workerCount, instanceNames?.ToList(), kind); + } + + /// Initializes a new instance of ResourceMetricDefinition. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Unit of the metric. + /// Primary aggregation type. + /// List of time grains supported for the metric together with retention period. + /// Resource URI. + /// Resource metric definition properties. + /// Kind of resource. + /// A new instance for mocking. + public static ResourceMetricDefinition ResourceMetricDefinition(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string unit = null, string primaryAggregationType = null, IEnumerable metricAvailabilities = null, Uri resourceUri = null, IReadOnlyDictionary properties = null, string kind = null) + { + metricAvailabilities ??= new List(); + properties ??= new Dictionary(); + + return new ResourceMetricDefinition(id, name, resourceType, systemData, unit, primaryAggregationType, metricAvailabilities?.ToList(), resourceUri, properties, kind); + } + + /// Initializes a new instance of ResourceMetricAvailability. + /// Time grain . + /// Retention period for the current time grain. + /// A new instance for mocking. + public static ResourceMetricAvailability ResourceMetricAvailability(string timeGrain = null, string retention = null) + { + return new ResourceMetricAvailability(timeGrain, retention); + } + + /// Initializes a new instance of AppServicePoolSkuInfo. + /// Resource type that this SKU applies to. + /// Name and tier of the SKU. + /// Min, max, and default scale values of the SKU. + /// A new instance for mocking. + public static AppServicePoolSkuInfo AppServicePoolSkuInfo(ResourceType? resourceType = null, AppServiceSkuDescription sku = null, AppServiceSkuCapacity capacity = null) + { + return new AppServicePoolSkuInfo(resourceType, sku, capacity); + } + + /// Initializes a new instance of AppServiceUsage. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Friendly name shown in the UI. + /// Name of the quota resource. + /// Units of measurement for the quota resource. + /// The current value of the resource counter. + /// The resource limit. + /// Next reset time for the resource counter. + /// Compute mode used for this usage. + /// Site mode used for this usage. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceUsage AppServiceUsage(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string resourceName = null, string unit = null, long? currentValue = null, long? limit = null, DateTimeOffset? nextResetOn = null, ComputeModeOption? computeMode = null, string siteMode = null, string kind = null) + { + return new AppServiceUsage(id, name, resourceType, systemData, displayName, resourceName, unit, currentValue, limit, nextResetOn, computeMode, siteMode, kind); + } + + /// Initializes a new instance of AppServiceOperation. + /// Operation ID. + /// Operation name. + /// The current status of the operation. + /// Any errors associate with the operation. + /// Time when operation has started. + /// Time when operation has been updated. + /// Time when operation will expire. + /// Applicable only for stamp operation ids. + /// A new instance for mocking. + public static AppServiceOperation AppServiceOperation(string id = null, string name = null, AppServiceOperationStatus? status = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? expireOn = null, Guid? geoMasterOperationId = null) + { + errors ??= new List(); + + return new AppServiceOperation(id, name, status, errors?.ToList(), createdOn, modifiedOn, expireOn, geoMasterOperationId); + } + + /// Initializes a new instance of OutboundEnvironmentEndpoint. + /// The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + /// The endpoints that the App Service Environment reaches the service at. + /// A new instance for mocking. + public static OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) + { + endpoints ??= new List(); + + return new OutboundEnvironmentEndpoint(category, endpoints?.ToList()); + } + + /// Initializes a new instance of AppServiceEndpointDependency. + /// The domain name of the dependency. + /// The IP Addresses and Ports used when connecting to DomainName. + /// A new instance for mocking. + public static AppServiceEndpointDependency AppServiceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) + { + endpointDetails ??= new List(); + + return new AppServiceEndpointDependency(domainName, endpointDetails?.ToList()); + } + + /// Initializes a new instance of AppServiceEndpointDetail. + /// An IP Address that Domain Name currently resolves to. + /// The port an endpoint is connected to. + /// The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. + /// Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. + /// A new instance for mocking. + public static AppServiceEndpointDetail AppServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, double? latency = null, bool? isAccessible = null) + { + return new AppServiceEndpointDetail(ipAddress, port, latency, isAccessible); + } + + /// Initializes a new instance of RemotePrivateEndpointConnectionARMResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// PrivateEndpoint of a remote private endpoint connection. + /// The state of a private link connection. + /// Private IPAddresses mapped to the remote private endpoint. + /// Kind of resource. + /// A new instance for mocking. + public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpointConnectionARMResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null) + { + ipAddresses ??= new List(); + + return new RemotePrivateEndpointConnectionARMResourceData(id, name, resourceType, systemData, provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, privateLinkServiceConnectionState, ipAddresses?.ToList(), kind); + } + + /// Initializes a new instance of PrivateLinkConnectionApprovalRequestInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of a private link connection. + /// Kind of resource. + /// A new instance for mocking. + public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) + { + return new PrivateLinkConnectionApprovalRequestInfo(id, name, resourceType, systemData, privateLinkServiceConnectionState, kind); + } + + /// Initializes a new instance of AppServicePrivateLinkResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of a private link resource. + /// A new instance for mocking. + public static AppServicePrivateLinkResourceData AppServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServicePrivateLinkResourceProperties properties = null) + { + return new AppServicePrivateLinkResourceData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of AppServicePrivateLinkResourceProperties. + /// GroupId of a private link resource. + /// RequiredMembers of a private link resource. + /// RequiredZoneNames of a private link resource. + /// A new instance for mocking. + public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResourceProperties(string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new AppServicePrivateLinkResourceProperties(groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + } + + /// Initializes a new instance of AppServicePlanData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Description of a SKU for a scalable resource. + /// Extended Location. + /// Target worker tier assigned to the App Service plan. + /// App Service plan status. + /// App Service plan subscription. + /// Specification for the App Service Environment to use for the App Service plan. + /// Maximum number of instances that can be assigned to this App Service plan. + /// Geographical location for the App Service plan. + /// + /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. + /// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. + /// + /// ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku. + /// Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + /// Number of apps assigned to this App Service plan. + /// If <code>true</code>, this App Service Plan owns spot instances. + /// The time when the server farm expires. Valid only if it is a spot server farm. + /// The time when the server farm free offer expires. + /// Resource group of the App Service plan. + /// If Linux app service plan <code>true</code>, <code>false</code> otherwise. + /// Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + /// If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + /// Scaling worker count. + /// Scaling worker size ID. + /// Provisioning state of the App Service Plan. + /// Specification for the Kubernetes Environment to use for the App Service plan. + /// + /// If <code>true</code>, this App Service Plan will perform availability zone balancing. + /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. + /// + /// Kind of resource. + /// A new instance for mocking. + public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) + { + tags ??= new Dictionary(); + + return new AppServicePlanData(id, name, resourceType, systemData, tags, location, sku, extendedLocation, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpireOn, freeOfferExpireOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind); + } + + /// Initializes a new instance of HostingEnvironmentProfile. + /// Resource ID of the App Service Environment. + /// Name of the App Service Environment. + /// Resource type of the App Service Environment. + /// A new instance for mocking. + public static HostingEnvironmentProfile HostingEnvironmentProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) + { + return new HostingEnvironmentProfile(id, name, resourceType); + } + + /// Initializes a new instance of KubeEnvironmentProfile. + /// Resource ID of the Kubernetes Environment. + /// Name of the Kubernetes Environment. + /// Resource type of the Kubernetes Environment. + /// A new instance for mocking. + public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) + { + return new KubeEnvironmentProfile(id, name, resourceType); + } + + /// Initializes a new instance of WebSiteData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity. + /// Extended Location. + /// Current state of the app. + /// Hostnames associated with the app. + /// Name of the repository site. + /// State indicating whether the app has exceeded its quota usage. Read-only. + /// <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + /// + /// Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + /// the app is not served on those hostnames. + /// + /// Management information availability state for the app. + /// Hostname SSL states are used to manage the SSL bindings for app's hostnames. + /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + /// <code>true</code> if reserved; otherwise, <code>false</code>. + /// Obsolete: Hyper-V sandbox. + /// Hyper-V sandbox. + /// Last time the app was modified, in UTC. Read-only. + /// Configuration of the app. + /// Azure Traffic Manager hostnames associated with the app. Read-only. + /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + /// Specifies which deployment slot this app will swap into. Read-only. + /// App Service Environment to use for the app. + /// <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. + /// <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + /// + /// This composes with ClientCertEnabled setting. + /// - ClientCertEnabled: false means ClientCert is ignored. + /// - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + /// - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + /// + /// client certificate authentication comma-separated exclusion paths. + /// + /// <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. + /// If <code>true</code>, the app is only accessible via API management process. + /// + /// Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + /// Size of the function container. + /// Maximum allowed daily memory-time quota (applicable on dynamic apps only). + /// App suspended till in case memory-time quota is exceeded. + /// + /// Maximum number of workers. + /// This only applies to Functions container. + /// + /// If specified during app creation, the app is cloned from a source app. + /// Name of the resource group the app belongs to. Read-only. + /// <code>true</code> if the app is a default container; otherwise, <code>false</code>. + /// Default hostname of the app. Read-only. + /// Status of the last deployment slot swap operation. + /// + /// HttpsOnly: configures a web site to accept only https requests. Issues redirect for + /// http requests + /// + /// Site redundancy mode. + /// Specifies an operation id if this site has a pending operation. + /// Checks if Customer provided storage account is required. + /// Identity to use for Key Vault Reference authentication. + /// + /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. + /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + /// + /// Kind of resource. + /// A new instance for mocking. + public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + { + tags ??= new Dictionary(); + hostNames ??= new List(); + enabledHostNames ??= new List(); + hostNameSslStates ??= new List(); + trafficManagerHostNames ??= new List(); + + return new WebSiteData(id, name, resourceType, systemData, tags, location, identity, extendedLocation, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), appServicePlanId, isReserved, isXenon, isHyperV, lastModifiedTimeUtc, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind); + } + + /// Initializes a new instance of SiteConfigProperties. + /// Number of workers. + /// Default documents. + /// .NET Framework version. + /// Version of PHP. + /// Version of Python. + /// Version of Node.js. + /// Version of PowerShell. + /// Linux App Framework and version. + /// Xenon App Framework and version. + /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + /// Request tracing expiration time. + /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + /// Remote debugging version. + /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + /// Flag to use Managed Identity Creds for ACR pull. + /// If using user managed identity, the user managed identity ClientId. + /// HTTP logs directory size limit. + /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + /// Publishing user name. + /// Application settings. + /// Connection strings. + /// Site MachineKey. + /// Handler mappings. + /// Document root. + /// SCM type. + /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + /// Java version. + /// Java container. + /// Java container version. + /// App command line to launch. + /// Managed pipeline mode. + /// Virtual applications. + /// Site load balancing. + /// This is work around for polymorphic types. + /// Site limits. + /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + /// Auto Heal rules. + /// Tracing options. + /// Virtual Network name. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. + /// Cross-Origin Resource Sharing (CORS) settings. + /// Push endpoint settings. + /// Information about the formal API definition for the app. + /// Azure API management settings linked to the app. + /// Auto-swap slot name. + /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + /// Managed Service Identity Id. + /// Explicit Managed Service Identity Id. + /// Identity to use for Key Vault Reference authentication. + /// IP security restrictions for main. + /// IP security restrictions for scm. + /// IP security restrictions for scm to use main. + /// Http20Enabled: configures a web site to allow clients to connect over http2.0. + /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. + /// State of FTP / FTPS service. + /// + /// Number of preWarmed instances. + /// This setting only applies to the Consumption and Elastic Plans + /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium Plans + /// + /// Health check path. + /// + /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but will instead call to the + /// runtime to get scale status. + /// + /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// + /// Number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + /// List of Azure Storage Accounts. + /// Property to allow or block all public traffic. + /// A new instance for mocking. + public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) + { + defaultDocuments ??= new List(); + appSettings ??= new List(); + connectionStrings ??= new List(); + handlerMappings ??= new List(); + virtualApplications ??= new List(); + experimentsRampUpRules ??= new List(); + ipSecurityRestrictions ??= new List(); + scmIPSecurityRestrictions ??= new List(); + azureStorageAccounts ??= new Dictionary(); + + return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess); + } + + /// Initializes a new instance of SiteMachineKey. + /// MachineKey validation. + /// Validation key. + /// Algorithm used for decryption. + /// Decryption key. + /// A new instance for mocking. + public static SiteMachineKey SiteMachineKey(string validation = null, string validationKey = null, string decryption = null, string decryptionKey = null) + { + return new SiteMachineKey(validation, validationKey, decryption, decryptionKey); + } + + /// Initializes a new instance of WebAppPushSettings. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets a flag indicating whether the Push endpoint is enabled. + /// Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. + /// + /// Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint. + /// Tags can consist of alphanumeric characters and the following: + /// '_', '@', '#', '.', ':', '-'. + /// Validation should be performed at the PushRequestHandler. + /// + /// Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppPushSettings WebAppPushSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isPushEnabled = null, string tagWhitelistJson = null, string tagsRequiringAuth = null, string dynamicTagsJson = null, string kind = null) + { + return new WebAppPushSettings(id, name, resourceType, systemData, isPushEnabled, tagWhitelistJson, tagsRequiringAuth, dynamicTagsJson, kind); + } + + /// Initializes a new instance of AppServiceStorageAccessInfo. + /// Type of storage. + /// Name of the storage account. + /// Name of the file share (container name, for Blob storage). + /// Access key for the storage account. + /// Path to mount the storage within the site's runtime environment. + /// State of the storage account. + /// A new instance for mocking. + public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null) + { + return new AppServiceStorageAccessInfo(storageType, accountName, shareName, accessKey, mountPath, state); + } + + /// Initializes a new instance of SlotSwapStatus. + /// The time the last successful slot swap completed. + /// The source slot of the last swap operation. + /// The destination slot of the last swap operation. + /// A new instance for mocking. + public static SlotSwapStatus SlotSwapStatus(DateTimeOffset? timestampUtc = null, string sourceSlotName = null, string destinationSlotName = null) + { + return new SlotSwapStatus(timestampUtc, sourceSlotName, destinationSlotName); + } + + /// Initializes a new instance of CsmUsageQuota. + /// Units of measurement for the quota resource. + /// Next reset time for the resource counter. + /// The current value of the resource counter. + /// The resource limit. + /// Quota name. + /// A new instance for mocking. + public static CsmUsageQuota CsmUsageQuota(string unit = null, DateTimeOffset? nextResetOn = null, long? currentValue = null, long? limit = null, LocalizableString name = null) + { + return new CsmUsageQuota(unit, nextResetOn, currentValue, limit, name); + } + + /// Initializes a new instance of LocalizableString. + /// Non-localized name. + /// Localized name. + /// A new instance for mocking. + public static LocalizableString LocalizableString(string value = null, string localizedValue = null) + { + return new LocalizableString(value, localizedValue); + } + + /// Initializes a new instance of AppServicePlanPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Target worker tier assigned to the App Service plan. + /// App Service plan status. + /// App Service plan subscription. + /// Specification for the App Service Environment to use for the App Service plan. + /// Maximum number of instances that can be assigned to this App Service plan. + /// Geographical location for the App Service plan. + /// + /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. + /// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. + /// + /// ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku. + /// Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + /// Number of apps assigned to this App Service plan. + /// If <code>true</code>, this App Service Plan owns spot instances. + /// The time when the server farm expires. Valid only if it is a spot server farm. + /// The time when the server farm free offer expires. + /// Resource group of the App Service plan. + /// If Linux app service plan <code>true</code>, <code>false</code> otherwise. + /// Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + /// If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + /// Scaling worker count. + /// Scaling worker size ID. + /// Provisioning state of the App Service Plan. + /// Specification for the Kubernetes Environment to use for the App Service plan. + /// + /// If <code>true</code>, this App Service Plan will perform availability zone balancing. + /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. + /// + /// Kind of resource. + /// A new instance for mocking. + public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) + { + return new AppServicePlanPatch(id, name, resourceType, systemData, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpirationOn, freeOfferExpirationOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind); + } + + /// Initializes a new instance of HybridConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the Service Bus namespace. + /// The name of the Service Bus relay. + /// The ARM URI to the Service Bus relay. + /// The hostname of the endpoint. + /// The port of the endpoint. + /// The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. + /// + /// The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM this key will not be returned + /// normally, use the POST /listKeys API instead. + /// + /// The suffix for the service bus endpoint. By default this is .servicebus.windows.net. + /// Kind of resource. + /// A new instance for mocking. + public static HybridConnectionData HybridConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serviceBusNamespace = null, string relayName = null, ResourceIdentifier relayArmId = null, string hostname = null, int? port = null, string sendKeyName = null, string sendKeyValue = null, string serviceBusSuffix = null, string kind = null) + { + return new HybridConnectionData(id, name, resourceType, systemData, serviceBusNamespace, relayName, relayArmId, hostname, port, sendKeyName, sendKeyValue, serviceBusSuffix, kind); + } + + /// Initializes a new instance of HybridConnectionKey. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the send key. + /// The value of the send key. + /// Kind of resource. + /// A new instance for mocking. + public static HybridConnectionKey HybridConnectionKey(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sendKeyName = null, string sendKeyValue = null, string kind = null) + { + return new HybridConnectionKey(id, name, resourceType, systemData, sendKeyName, sendKeyValue, kind); + } + + /// Initializes a new instance of HybridConnectionLimitData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The current number of Hybrid Connections. + /// The maximum number of Hybrid Connections allowed. + /// Kind of resource. + /// A new instance for mocking. + public static HybridConnectionLimitData HybridConnectionLimitData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? current = null, int? maximum = null, string kind = null) + { + return new HybridConnectionLimitData(id, name, resourceType, systemData, current, maximum, kind); + } + + /// Initializes a new instance of AppServiceVirtualNetworkData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Virtual Network's resource ID. + /// The client certificate thumbprint. + /// + /// A certificate file (.cer) blob containing the public key of the private key used to authenticate a + /// Point-To-Site VPN connection. + /// + /// The routes that this Virtual Network connection uses. + /// <code>true</code> if a resync is required; otherwise, <code>false</code>. + /// DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + /// Flag that is used to denote if this is VNET injection. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceVirtualNetworkData AppServiceVirtualNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier vnetResourceId = null, string certThumbprintString = null, string certBlob = null, IEnumerable routes = null, bool? isResyncRequired = null, string dnsServers = null, bool? isSwift = null, string kind = null) + { + routes ??= new List(); + + return new AppServiceVirtualNetworkData(id, name, resourceType, systemData, vnetResourceId, certThumbprintString, certBlob, routes?.ToList(), isResyncRequired, dnsServers, isSwift, kind); + } + + /// Initializes a new instance of AppServiceVirtualNetworkProperties. + /// The Virtual Network's resource ID. + /// The client certificate thumbprint. + /// + /// A certificate file (.cer) blob containing the public key of the private key used to authenticate a + /// Point-To-Site VPN connection. + /// + /// The routes that this Virtual Network connection uses. + /// <code>true</code> if a resync is required; otherwise, <code>false</code>. + /// DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + /// Flag that is used to denote if this is VNET injection. + /// A new instance for mocking. + public static AppServiceVirtualNetworkProperties AppServiceVirtualNetworkProperties(ResourceIdentifier vnetResourceId = null, string certThumbprintString = null, string certBlob = null, IEnumerable routes = null, bool? isResyncRequired = null, string dnsServers = null, bool? isSwift = null) + { + routes ??= new List(); + + return new AppServiceVirtualNetworkProperties(vnetResourceId, certThumbprintString, certBlob, routes?.ToList(), isResyncRequired, dnsServers, isSwift); + } + + /// Initializes a new instance of AppServiceVirtualNetworkRoute. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. + /// The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. + /// + /// The type of route this is: + /// DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 + /// INHERITED - Routes inherited from the real Virtual Network routes + /// STATIC - Static route set on the app only + /// + /// These values will be used for syncing an app's routes with those from a Virtual Network. + /// + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceVirtualNetworkRoute AppServiceVirtualNetworkRoute(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string startAddress = null, string endAddress = null, AppServiceVirtualNetworkRouteType? routeType = null, string kind = null) + { + return new AppServiceVirtualNetworkRoute(id, name, resourceType, systemData, startAddress, endAddress, routeType, kind); + } + + /// Initializes a new instance of AppServiceVirtualNetworkGatewayData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Virtual Network name. + /// The URI where the VPN package can be downloaded. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceVirtualNetworkGatewayData AppServiceVirtualNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vnetName = null, Uri vpnPackageUri = null, string kind = null) + { + return new AppServiceVirtualNetworkGatewayData(id, name, resourceType, systemData, vnetName, vpnPackageUri, kind); + } + + /// Initializes a new instance of AppCertificateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Certificate password. + /// Friendly name of the certificate. + /// Subject name of the certificate. + /// Host names the certificate applies to. + /// Pfx blob. + /// App name. + /// Self link. + /// Certificate issuer. + /// Certificate issue Date. + /// Certificate expiration date. + /// Certificate thumbprint. + /// Is the certificate valid?. + /// Raw bytes of .cer file. + /// Public key hash. + /// Specification for the App Service Environment to use for the certificate. + /// Key Vault Csm resource Id. + /// Key Vault secret name. + /// Status of the Key Vault secret. + /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + /// CNAME of the certificate to be issued via free certificate. + /// Method of domain validation for free cert. + /// Kind of resource. + /// A new instance for mocking. + public static AppCertificateData AppCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string password = null, string friendlyName = null, string subjectName = null, IEnumerable hostNames = null, byte[] pfxBlob = null, string siteName = null, string selfLink = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprintString = null, bool? isValid = null, byte[] cerBlob = null, string publicKeyHash = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? keyVaultSecretStatus = null, ResourceIdentifier serverFarmId = null, string canonicalName = null, string domainValidationMethod = null, string kind = null) + { + tags ??= new Dictionary(); + hostNames ??= new List(); + + return new AppCertificateData(id, name, resourceType, systemData, tags, location, password, friendlyName, subjectName, hostNames?.ToList(), pfxBlob, siteName, selfLink, issuer, issueOn, expireOn, thumbprintString, isValid, cerBlob, publicKeyHash, hostingEnvironmentProfile, keyVaultId, keyVaultSecretName, keyVaultSecretStatus, serverFarmId, canonicalName, domainValidationMethod, kind); + } + + /// Initializes a new instance of AppCertificatePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Certificate password. + /// Friendly name of the certificate. + /// Subject name of the certificate. + /// Host names the certificate applies to. + /// Pfx blob. + /// App name. + /// Self link. + /// Certificate issuer. + /// Certificate issue Date. + /// Certificate expiration date. + /// Certificate thumbprint. + /// Is the certificate valid?. + /// Raw bytes of .cer file. + /// Public key hash. + /// Specification for the App Service Environment to use for the certificate. + /// Key Vault Csm resource Id. + /// Key Vault secret name. + /// Status of the Key Vault secret. + /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + /// CNAME of the certificate to be issued via free certificate. + /// Method of domain validation for free cert. + /// Kind of resource. + /// A new instance for mocking. + public static AppCertificatePatch AppCertificatePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string password = null, string friendlyName = null, string subjectName = null, IEnumerable hostNames = null, byte[] pfxBlob = null, string siteName = null, string selfLink = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprintString = null, bool? isValid = null, byte[] cerBlob = null, string publicKeyHash = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? keyVaultSecretStatus = null, ResourceIdentifier serverFarmId = null, string canonicalName = null, string domainValidationMethod = null, string kind = null) + { + hostNames ??= new List(); + + return new AppCertificatePatch(id, name, resourceType, systemData, password, friendlyName, subjectName, hostNames?.ToList(), pfxBlob, siteName, selfLink, issuer, issueOn, expireOn, thumbprintString, isValid, cerBlob, publicKeyHash, hostingEnvironmentProfile, keyVaultId, keyVaultSecretName, keyVaultSecretStatus, serverFarmId, canonicalName, domainValidationMethod, kind); + } + + /// Initializes a new instance of DeletedSiteData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Numeric id for the deleted site. + /// Time in UTC when the app was deleted. + /// Subscription containing the deleted site. + /// ResourceGroup that contained the deleted site. + /// Name of the deleted site. + /// Slot of the deleted site. + /// Kind of site that was deleted. + /// Geo Region of the deleted site. + /// Kind of resource. + /// A new instance for mocking. + public static DeletedSiteData DeletedSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? deletedSiteId = null, string deletedTimestamp = null, string subscription = null, string resourceGroup = null, string deletedSiteName = null, string slot = null, string kindPropertiesKind = null, string geoRegionName = null, string kind = null) + { + return new DeletedSiteData(id, name, resourceType, systemData, deletedSiteId, deletedTimestamp, subscription, resourceGroup, deletedSiteName, slot, kindPropertiesKind, geoRegionName, kind); + } + + /// Initializes a new instance of DiagnosticCategoryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the diagnostic category. + /// Kind of resource. + /// A new instance for mocking. + public static DiagnosticCategoryData DiagnosticCategoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string kind = null) + { + return new DiagnosticCategoryData(id, name, resourceType, systemData, description, kind); + } + + /// Initializes a new instance of WebSiteAnalysisDefinitionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the Analysis. + /// Kind of resource. + /// A new instance for mocking. + public static WebSiteAnalysisDefinitionData WebSiteAnalysisDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string kind = null) + { + return new WebSiteAnalysisDefinitionData(id, name, resourceType, systemData, description, kind); + } + + /// Initializes a new instance of DiagnosticAnalysis. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Start time of the period. + /// End time of the period. + /// List of time periods. + /// Data by each detector. + /// Data by each detector for detectors that did not corelate. + /// Kind of resource. + /// A new instance for mocking. + public static DiagnosticAnalysis DiagnosticAnalysis(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable abnormalTimePeriods = null, IEnumerable payload = null, IEnumerable nonCorrelatedDetectors = null, string kind = null) + { + abnormalTimePeriods ??= new List(); + payload ??= new List(); + nonCorrelatedDetectors ??= new List(); + + return new DiagnosticAnalysis(id, name, resourceType, systemData, startOn, endOn, abnormalTimePeriods?.ToList(), payload?.ToList(), nonCorrelatedDetectors?.ToList(), kind); + } + + /// Initializes a new instance of DetectorDefinition. + /// Display name of the detector. + /// Description of the detector. + /// Detector Rank. + /// Flag representing whether detector is enabled or not. + /// A new instance for mocking. + public static DetectorDefinition DetectorDefinition(string displayName = null, string description = null, double? rank = null, bool? isEnabled = null) + { + return new DetectorDefinition(displayName, description, rank, isEnabled); + } + + /// Initializes a new instance of DetectorDefinitionResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name of the detector. + /// Description of the detector. + /// Detector Rank. + /// Flag representing whether detector is enabled or not. + /// Kind of resource. + /// A new instance for mocking. + public static DetectorDefinitionResourceData DetectorDefinitionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, double? rank = null, bool? isEnabled = null, string kind = null) + { + return new DetectorDefinitionResourceData(id, name, resourceType, systemData, displayName, description, rank, isEnabled, kind); + } + + /// Initializes a new instance of DiagnosticDetectorResponse. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Start time of the period. + /// End time of the period. + /// Flag representing Issue was detected. + /// Detector's definition. + /// Metrics provided by the detector. + /// List of Correlated events found by the detector. + /// Additional Data that detector wants to send. + /// Meta Data. + /// Kind of resource. + /// A new instance for mocking. + public static DiagnosticDetectorResponse DiagnosticDetectorResponse(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? issueDetected = null, DetectorDefinition detectorDefinition = null, IEnumerable metrics = null, IEnumerable abnormalTimePeriods = null, IEnumerable> data = null, DetectorDataSource dataSource = null, string kind = null) + { + metrics ??= new List(); + abnormalTimePeriods ??= new List(); + data ??= new List>(); + + return new DiagnosticDetectorResponse(id, name, resourceType, systemData, startOn, endOn, issueDetected, detectorDefinition, metrics?.ToList(), abnormalTimePeriods?.ToList(), data?.ToList(), dataSource != null ? new DetectorMetadata(dataSource) : null, kind); + } + + /// Initializes a new instance of AppSnapshot. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The time the snapshot was taken. + /// Kind of resource. + /// A new instance for mocking. + public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string time = null, string kind = null) + { + return new AppSnapshot(id, name, resourceType, systemData, time, kind); + } + + /// Initializes a new instance of KubeEnvironmentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Extended Location. + /// Provisioning state of the Kubernetes Environment. + /// Any errors that occurred during deployment or deployment validation. + /// Only visible within Vnet/Subnet. + /// Default Domain Name for the cluster. + /// Static IP of the KubeEnvironment. + /// + /// Cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + /// + /// Cluster configuration which enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) + { + tags ??= new Dictionary(); + + return new KubeEnvironmentData(id, name, resourceType, systemData, tags, location, extendedLocation, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind); + } + + /// Initializes a new instance of KubeEnvironmentPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the Kubernetes Environment. + /// Any errors that occurred during deployment or deployment validation. + /// Only visible within Vnet/Subnet. + /// Default Domain Name for the cluster. + /// Static IP of the KubeEnvironment. + /// + /// Cluster configuration which determines the ARC cluster + /// components types. Eg: Choosing between BuildService kind, + /// FrontEnd Service ArtifactsStorageType etc. + /// + /// + /// Cluster configuration which enables the log daemon to export + /// app logs to a destination. Currently only "log-analytics" is + /// supported + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) + { + return new KubeEnvironmentPatch(id, name, resourceType, systemData, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind); + } + + /// Initializes a new instance of ApplicationStackResource. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application stack name. + /// Application stack display name. + /// Application stack dependency. + /// List of major versions available. + /// List of frameworks associated with application stack. + /// <code>true</code> if this is the stack is deprecated; otherwise, <code>false</code>. + /// Kind of resource. + /// A new instance for mocking. + public static ApplicationStackResource ApplicationStackResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string stackName = null, string display = null, string dependency = null, IEnumerable majorVersions = null, IEnumerable frameworks = null, IEnumerable isDeprecated = null, string kind = null) + { + majorVersions ??= new List(); + frameworks ??= new List(); + isDeprecated ??= new List(); + + return new ApplicationStackResource(id, name, resourceType, systemData, stackName, display, dependency, majorVersions?.ToList(), frameworks?.ToList(), isDeprecated?.ToList(), kind); + } + + /// Initializes a new instance of FunctionAppStack. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Function App stack location. + /// Function App stack (display only). + /// Function App stack name. + /// List of major versions available. + /// Function App stack preferred OS. + /// Kind of resource. + /// A new instance for mocking. + public static FunctionAppStack FunctionAppStack(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string displayText = null, string value = null, IEnumerable majorVersions = null, StackPreferredOS? preferredOS = null, string kind = null) + { + majorVersions ??= new List(); + + return new FunctionAppStack(id, name, resourceType, systemData, location, displayText, value, majorVersions?.ToList(), preferredOS, kind); + } + + /// Initializes a new instance of FunctionAppMajorVersion. + /// Function App stack major version (display only). + /// Function App stack major version name. + /// Minor versions associated with the major version. + /// A new instance for mocking. + public static FunctionAppMajorVersion FunctionAppMajorVersion(string displayText = null, string value = null, IEnumerable minorVersions = null) + { + minorVersions ??= new List(); + + return new FunctionAppMajorVersion(displayText, value, minorVersions?.ToList()); + } + + /// Initializes a new instance of FunctionAppMinorVersion. + /// Function App stack (display only). + /// Function App stack name. + /// Settings associated with the minor version. + /// A new instance for mocking. + public static FunctionAppMinorVersion FunctionAppMinorVersion(string displayText = null, string value = null, FunctionAppRuntimes stackSettings = null) + { + return new FunctionAppMinorVersion(displayText, value, stackSettings); + } + + /// Initializes a new instance of FunctionAppRuntimes. + /// Linux-specific settings associated with the minor version. + /// Windows-specific settings associated with the minor version. + /// A new instance for mocking. + public static FunctionAppRuntimes FunctionAppRuntimes(FunctionAppRuntimeSettings linuxRuntimeSettings = null, FunctionAppRuntimeSettings windowsRuntimeSettings = null) + { + return new FunctionAppRuntimes(linuxRuntimeSettings, windowsRuntimeSettings); + } + + /// Initializes a new instance of FunctionAppRuntimeSettings. + /// Function App stack minor version (runtime only). + /// <code>true</code> if remote debugging is supported for the stack; otherwise, <code>false</code>. + /// Application Insights settings associated with the minor version. + /// GitHub Actions settings associated with the minor version. + /// Application settings associated with the minor version. + /// Configuration settings associated with the minor version. + /// List of supported Functions extension versions. + /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. + /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. + /// End-of-life date for the minor version. + /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. + /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. + /// <code>true</code> if the minor version the default; otherwise, <code>false</code>. + /// A new instance for mocking. + public static FunctionAppRuntimeSettings FunctionAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = null, AppInsightsWebAppStackSettings appInsightsSettings = null, GitHubActionWebAppStackSettings gitHubActionSettings = null, IReadOnlyDictionary appSettingsDictionary = null, SiteConfigPropertiesDictionary siteConfigPropertiesDictionary = null, IEnumerable supportedFunctionsExtensionVersions = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null, bool? isDefault = null) + { + appSettingsDictionary ??= new Dictionary(); + supportedFunctionsExtensionVersions ??= new List(); + + return new FunctionAppRuntimeSettings(runtimeVersion, isRemoteDebuggingSupported, appInsightsSettings, gitHubActionSettings, appSettingsDictionary, siteConfigPropertiesDictionary, supportedFunctionsExtensionVersions?.ToList(), isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess, isDefault); + } + + /// Initializes a new instance of AppInsightsWebAppStackSettings. + /// <code>true</code> if remote Application Insights is supported for the stack; otherwise, <code>false</code>. + /// <code>true</code> if Application Insights is disabled by default for the stack; otherwise, <code>false</code>. + /// A new instance for mocking. + public static AppInsightsWebAppStackSettings AppInsightsWebAppStackSettings(bool? isSupported = null, bool? isDefaultOff = null) + { + return new AppInsightsWebAppStackSettings(isSupported, isDefaultOff); + } + + /// Initializes a new instance of GitHubActionWebAppStackSettings. + /// <code>true</code> if GitHub Actions is supported for the stack; otherwise, <code>false</code>. + /// The minor version that is supported for GitHub Actions. + /// A new instance for mocking. + public static GitHubActionWebAppStackSettings GitHubActionWebAppStackSettings(bool? isSupported = null, string supportedVersion = null) + { + return new GitHubActionWebAppStackSettings(isSupported, supportedVersion); + } + + /// Initializes a new instance of SiteConfigPropertiesDictionary. + /// <code>true</code> if use32BitWorkerProcess should be set to true for the stack; otherwise, <code>false</code>. + /// LinuxFxVersion configuration setting. + /// JavaVersion configuration setting. + /// PowerShellVersion configuration setting. + /// A new instance for mocking. + public static SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = null, string linuxFxVersion = null, string javaVersion = null, string powerShellVersion = null) + { + return new SiteConfigPropertiesDictionary(use32BitWorkerProcess, linuxFxVersion, javaVersion, powerShellVersion); + } + + /// Initializes a new instance of WebAppStack. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Web App stack location. + /// Web App stack (display only). + /// Web App stack name. + /// List of major versions available. + /// Web App stack preferred OS. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppStack WebAppStack(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string displayText = null, string value = null, IEnumerable majorVersions = null, StackPreferredOS? preferredOS = null, string kind = null) + { + majorVersions ??= new List(); + + return new WebAppStack(id, name, resourceType, systemData, location, displayText, value, majorVersions?.ToList(), preferredOS, kind); + } + + /// Initializes a new instance of WebAppMajorVersion. + /// Web App stack major version (display only). + /// Web App stack major version name. + /// Minor versions associated with the major version. + /// A new instance for mocking. + public static WebAppMajorVersion WebAppMajorVersion(string displayText = null, string value = null, IEnumerable minorVersions = null) + { + minorVersions ??= new List(); + + return new WebAppMajorVersion(displayText, value, minorVersions?.ToList()); + } + + /// Initializes a new instance of WebAppMinorVersion. + /// Web App stack minor version (display only). + /// Web App stack major version name. + /// Settings associated with the minor version. + /// A new instance for mocking. + public static WebAppMinorVersion WebAppMinorVersion(string displayText = null, string value = null, WebAppRuntimes stackSettings = null) + { + return new WebAppMinorVersion(displayText, value, stackSettings); + } + + /// Initializes a new instance of WebAppRuntimes. + /// Linux-specific settings associated with the minor version. + /// Windows-specific settings associated with the minor version. + /// Linux-specific settings associated with the Java container minor version. + /// Windows-specific settings associated with the Java container minor version. + /// A new instance for mocking. + public static WebAppRuntimes WebAppRuntimes(WebAppRuntimeSettings linuxRuntimeSettings = null, WebAppRuntimeSettings windowsRuntimeSettings = null, LinuxJavaContainerSettings linuxContainerSettings = null, WindowsJavaContainerSettings windowsContainerSettings = null) + { + return new WebAppRuntimes(linuxRuntimeSettings, windowsRuntimeSettings, linuxContainerSettings, windowsContainerSettings); + } + + /// Initializes a new instance of WebAppRuntimeSettings. + /// Web App stack minor version (runtime only). + /// <code>true</code> if remote debugging is supported for the stack; otherwise, <code>false</code>. + /// Application Insights settings associated with the minor version. + /// GitHub Actions settings associated with the minor version. + /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. + /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. + /// End-of-life date for the minor version. + /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. + /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. + /// A new instance for mocking. + public static WebAppRuntimeSettings WebAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = null, AppInsightsWebAppStackSettings appInsightsSettings = null, GitHubActionWebAppStackSettings gitHubActionSettings = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) + { + return new WebAppRuntimeSettings(runtimeVersion, isRemoteDebuggingSupported, appInsightsSettings, gitHubActionSettings, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); + } + + /// Initializes a new instance of LinuxJavaContainerSettings. + /// Java 11 version (runtime only). + /// Java 8 version (runtime only). + /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. + /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. + /// End-of-life date for the minor version. + /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. + /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. + /// A new instance for mocking. + public static LinuxJavaContainerSettings LinuxJavaContainerSettings(string java11Runtime = null, string java8Runtime = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) + { + return new LinuxJavaContainerSettings(java11Runtime, java8Runtime, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); + } + + /// Initializes a new instance of WindowsJavaContainerSettings. + /// Java container (runtime only). + /// Java container version (runtime only). + /// <code>true</code> if the stack is in preview; otherwise, <code>false</code>. + /// <code>true</code> if the stack is deprecated; otherwise, <code>false</code>. + /// <code>true</code> if the stack should be hidden; otherwise, <code>false</code>. + /// End-of-life date for the minor version. + /// <code>true</code> if the stack version is auto-updated; otherwise, <code>false</code>. + /// <code>true</code> if the minor version is early-access; otherwise, <code>false</code>. + /// A new instance for mocking. + public static WindowsJavaContainerSettings WindowsJavaContainerSettings(string javaContainer = null, string javaContainerVersion = null, bool? isPreview = null, bool? isDeprecated = null, bool? isHidden = null, DateTimeOffset? endOfLifeOn = null, bool? isAutoUpdate = null, bool? isEarlyAccess = null) + { + return new WindowsJavaContainerSettings(javaContainer, javaContainerVersion, isPreview, isDeprecated, isHidden, endOfLifeOn, isAutoUpdate, isEarlyAccess); + } + + /// Initializes a new instance of AppServiceRecommendation. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Timestamp when this instance was created. + /// A GUID value that each recommendation object is associated with. + /// Full ARM resource ID string that this recommendation object is associated with. + /// Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. + /// Unique name of the rule. + /// UI friendly name of the rule (may not be unique). + /// Recommendation text. + /// Level indicating how critical this recommendation can impact. + /// List of channels that this recommendation can apply. + /// The list of category tags that this recommendation belongs to. + /// Name of action recommended by this object. + /// True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + /// The list of states of this recommendation. If it's null then it should be considered "Active". + /// The beginning time in UTC of a range that the recommendation refers to. + /// The end time in UTC of a range that the recommendation refers to. + /// When to notify this recommendation next in UTC. Null means that this will never be notified anymore. + /// Date and time in UTC when this notification expires. + /// Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. + /// A metric value measured by the rule. + /// True if this is associated with a dynamically added rule. + /// Extension name of the portal if exists. + /// Deep link to a blade on the portal. + /// Forward link to an external document associated with the rule. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceRecommendation AppServiceRecommendation(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, Guid? recommendationId = null, ResourceIdentifier resourceId = null, ResourceScopeType? resourceScope = null, string ruleName = null, string displayName = null, string message = null, NotificationLevel? level = null, RecommendationChannel? channels = null, IEnumerable categoryTags = null, string actionName = null, int? enabled = null, IEnumerable states = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? nextNotificationOn = null, DateTimeOffset? notificationExpirationOn = null, DateTimeOffset? notifiedOn = null, double? score = null, bool? isDynamic = null, string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) + { + categoryTags ??= new List(); + states ??= new List(); + + return new AppServiceRecommendation(id, name, resourceType, systemData, createdOn, recommendationId, resourceId, resourceScope, ruleName, displayName, message, level, channels, categoryTags?.ToList(), actionName, enabled, states?.ToList(), startOn, endOn, nextNotificationOn, notificationExpirationOn, notifiedOn, score, isDynamic, extensionName, bladeName, forwardLink, kind); + } + + /// Initializes a new instance of RecommendationRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Unique name of the rule. + /// UI friendly name of the rule. + /// Localized name of the rule (Good for UI). + /// + /// Recommendation ID of an associated recommendation object tied to the rule, if exists. + /// If such an object doesn't exist, it is set to null. + /// + /// Localized detailed description of the rule. + /// Name of action that is recommended by this rule in string. + /// Level of impact indicating how critical this rule is. + /// List of available channels that this rule applies. + /// The list of category tags that this recommendation rule belongs to. + /// True if this is associated with a dynamically added rule. + /// Extension name of the portal if exists. Applicable to dynamic rule only. + /// Deep link to a blade on the portal. Applicable to dynamic rule only. + /// Forward link to an external document associated with the rule. Applicable to dynamic rule only. + /// Kind of resource. + /// A new instance for mocking. + public static RecommendationRuleData RecommendationRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string recommendationName = null, string displayName = null, string message = null, Guid? recommendationId = null, string description = null, string actionName = null, NotificationLevel? level = null, RecommendationChannel? channels = null, IEnumerable categoryTags = null, bool? isDynamic = null, string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) + { + categoryTags ??= new List(); + + return new RecommendationRuleData(id, name, resourceType, systemData, recommendationName, displayName, message, recommendationId, description, actionName, level, channels, categoryTags?.ToList(), isDynamic, extensionName, bladeName, forwardLink, kind); + } + + /// Initializes a new instance of ResourceHealthMetadataData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The category that the resource matches in the RHC Policy File. + /// Is there a health signal for the resource. + /// Kind of resource. + /// A new instance for mocking. + public static ResourceHealthMetadataData ResourceHealthMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string category = null, bool? isSignalAvailable = null, string kind = null) + { + return new ResourceHealthMetadataData(id, name, resourceType, systemData, category, isSignalAvailable, kind); + } + + /// Initializes a new instance of PublishingUserData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Username used for publishing. + /// Password used for publishing. + /// Password hash used for publishing. + /// Password hash salt used for publishing. + /// Url of SCM site. + /// Kind of resource. + /// A new instance for mocking. + public static PublishingUserData PublishingUserData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publishingUserName = null, string publishingPassword = null, string publishingPasswordHash = null, string publishingPasswordHashSalt = null, Uri scmUri = null, string kind = null) + { + return new PublishingUserData(id, name, resourceType, systemData, publishingUserName, publishingPassword, publishingPasswordHash, publishingPasswordHashSalt, scmUri, kind); + } + + /// Initializes a new instance of AppServiceSourceControlData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// OAuth access token. + /// OAuth access token secret. + /// OAuth refresh token. + /// OAuth token expiration. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceSourceControlData AppServiceSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string token = null, string tokenSecret = null, string refreshToken = null, DateTimeOffset? expireOn = null, string kind = null) + { + return new AppServiceSourceControlData(id, name, resourceType, systemData, token, tokenSecret, refreshToken, expireOn, kind); + } + + /// Initializes a new instance of AppServiceBillingMeter. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Meter GUID onboarded in Commerce. + /// Azure Location of billable resource. + /// Short Name from App Service Azure pricing Page. + /// Friendly name of the meter. + /// App Service OS type meter used for. + /// Meter Multiplier. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceBillingMeter AppServiceBillingMeter(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? meterId = null, AzureLocation? billingLocation = null, string shortName = null, string friendlyName = null, string osType = null, double? multiplier = null, string kind = null) + { + return new AppServiceBillingMeter(id, name, resourceType, systemData, meterId, billingLocation, shortName, friendlyName, osType, multiplier, kind); + } + + /// Initializes a new instance of ResourceNameAvailability. + /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// A new instance for mocking. + public static ResourceNameAvailability ResourceNameAvailability(bool? isNameAvailable = null, InAvailabilityReasonType? reason = null, string message = null) + { + return new ResourceNameAvailability(isNameAvailable, reason, message); + } + + /// Initializes a new instance of AppServiceDeploymentLocations. + /// Available regions. + /// Available App Service Environments with full descriptions of the environments. + /// Available App Service Environments with basic information. + /// A new instance for mocking. + public static AppServiceDeploymentLocations AppServiceDeploymentLocations(IEnumerable locations = null, IEnumerable hostingEnvironments = null, IEnumerable hostingEnvironmentDeploymentInfos = null) + { + locations ??= new List(); + hostingEnvironments ??= new List(); + hostingEnvironmentDeploymentInfos ??= new List(); + + return new AppServiceDeploymentLocations(locations?.ToList(), hostingEnvironments?.ToList(), hostingEnvironmentDeploymentInfos?.ToList()); + } + + /// Initializes a new instance of AppServiceGeoRegion. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Region description. + /// Display name for region. + /// Display name for region. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceGeoRegion AppServiceGeoRegion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string displayName = null, string orgDomain = null, string kind = null) + { + return new AppServiceGeoRegion(id, name, resourceType, systemData, description, displayName, orgDomain, kind); + } + + /// Initializes a new instance of HostingEnvironmentDeploymentInfo. + /// Name of the App Service Environment. + /// Location of the App Service Environment. + /// A new instance for mocking. + public static HostingEnvironmentDeploymentInfo HostingEnvironmentDeploymentInfo(string name = null, AzureLocation? location = null) + { + return new HostingEnvironmentDeploymentInfo(name, location); + } + + /// Initializes a new instance of AppServiceIdentifierData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// String representation of the identity. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) + { + return new AppServiceIdentifierData(id, name, resourceType, systemData, value, kind); + } + + /// Initializes a new instance of PremierAddOnOffer. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Premier add on SKU. + /// Premier add on offer Product. + /// Premier add on offer Vendor. + /// <code>true</code> if promotion code is required; otherwise, <code>false</code>. + /// Premier add on offer Quota. + /// App Service plans this offer is restricted to. + /// Privacy policy URL. + /// Legal terms URL. + /// Marketplace publisher. + /// Marketplace offer. + /// Kind of resource. + /// A new instance for mocking. + public static PremierAddOnOffer PremierAddOnOffer(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sku = null, string product = null, string vendor = null, bool? isPromoCodeRequired = null, int? quota = null, AppServicePlanRestriction? webHostingPlanRestrictions = null, Uri privacyPolicyUri = null, Uri legalTermsUri = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) + { + return new PremierAddOnOffer(id, name, resourceType, systemData, sku, product, vendor, isPromoCodeRequired, quota, webHostingPlanRestrictions, privacyPolicyUri, legalTermsUri, marketplacePublisher, marketplaceOffer, kind); + } + + /// Initializes a new instance of AppServiceSkuResult. + /// Resource type that this SKU applies to. + /// List of SKUs the subscription is able to use. + /// A new instance for mocking. + public static AppServiceSkuResult AppServiceSkuResult(ResourceType? resourceType = null, IEnumerable skus = null) + { + skus ??= new List(); + + return new AppServiceSkuResult(resourceType, skus?.ToList()); + } + + /// Initializes a new instance of GlobalCsmSkuDescription. + /// Name of the resource SKU. + /// Service Tier of the resource SKU. + /// Size specifier of the resource SKU. + /// Family code of the resource SKU. + /// Min, max, and default scale values of the SKU. + /// Locations of the SKU. + /// Capabilities of the SKU, e.g., is traffic manager enabled?. + /// A new instance for mocking. + public static GlobalCsmSkuDescription GlobalCsmSkuDescription(string name = null, string tier = null, string size = null, string family = null, AppServiceSkuCapacity capacity = null, IEnumerable locations = null, IEnumerable capabilities = null) + { + locations ??= new List(); + capabilities ??= new List(); + + return new GlobalCsmSkuDescription(name, tier, size, family, capacity, locations?.ToList(), capabilities?.ToList()); + } + + /// Initializes a new instance of AppServiceVirtualNetworkValidationContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Resource Group of the VNET to be validated. + /// The name of the VNET to be validated. + /// The subnet name to be validated. + /// The ARM Resource ID of the subnet to validate. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceVirtualNetworkValidationContent AppServiceVirtualNetworkValidationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vnetResourceGroup = null, string vnetName = null, string vnetSubnetName = null, ResourceIdentifier subnetResourceId = null, string kind = null) + { + return new AppServiceVirtualNetworkValidationContent(id, name, resourceType, systemData, vnetResourceGroup, vnetName, vnetSubnetName, subnetResourceId, kind); + } + + /// Initializes a new instance of VirtualNetworkValidationFailureDetails. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Text describing the validation outcome. + /// A flag describing whether or not validation failed. + /// A list of tests that failed in the validation. + /// A list of warnings generated during validation. + /// Kind of resource. + /// A new instance for mocking. + public static VirtualNetworkValidationFailureDetails VirtualNetworkValidationFailureDetails(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string message = null, bool? isFailed = null, IEnumerable failedTests = null, IEnumerable warnings = null, string kind = null) + { + failedTests ??= new List(); + warnings ??= new List(); + + return new VirtualNetworkValidationFailureDetails(id, name, resourceType, systemData, message, isFailed, failedTests?.ToList(), warnings?.ToList(), kind); + } + + /// Initializes a new instance of VirtualNetworkValidationTestFailure. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the test that failed. + /// The details of what caused the failure, e.g. the blocking rule name, etc. + /// Kind of resource. + /// A new instance for mocking. + public static VirtualNetworkValidationTestFailure VirtualNetworkValidationTestFailure(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string testName = null, string details = null, string kind = null) + { + return new VirtualNetworkValidationTestFailure(id, name, resourceType, systemData, testName, details, kind); + } + + /// Initializes a new instance of AppServiceValidateResult. + /// Result of validation. + /// Error details for the case when validation fails. + /// A new instance for mocking. + public static AppServiceValidateResult AppServiceValidateResult(string status = null, ValidateResponseError error = null) + { + return new AppServiceValidateResult(status, error); + } + + /// Initializes a new instance of ValidateResponseError. + /// Validation error code. + /// Validation error message. + /// A new instance for mocking. + public static ValidateResponseError ValidateResponseError(string code = null, string message = null) + { + return new ValidateResponseError(code, message); + } + + /// Initializes a new instance of StaticSitesWorkflowPreviewContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// URL for the repository of the static site. + /// The target branch in the repository. + /// Build properties to configure on the repository. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSitesWorkflowPreviewContent StaticSitesWorkflowPreviewContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repositoryUri = null, string branch = null, StaticSiteBuildProperties buildProperties = null, string kind = null) + { + return new StaticSitesWorkflowPreviewContent(id, name, resourceType, systemData, repositoryUri, branch, buildProperties, kind); + } + + /// Initializes a new instance of StaticSitesWorkflowPreview. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The path for the workflow file to be generated. + /// The contents for the workflow file to be generated. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, string contents = null, string kind = null) + { + return new StaticSitesWorkflowPreview(id, name, resourceType, systemData, path, contents, kind); + } + + /// Initializes a new instance of StaticSiteData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Description of a SKU for a scalable resource. + /// Managed service identity. + /// The default autogenerated hostname for the static site. + /// URL for the repository of the static site. + /// The target branch in the repository. + /// The custom domains associated with this static site. + /// A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + /// Build properties to configure on the repository. + /// Private endpoint connections. + /// State indicating whether staging environments are allowed or not allowed for a static web app. + /// <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. + /// Template options for generating a new repository. + /// The content distribution endpoint for the static site. + /// Identity to use for Key Vault Reference authentication. + /// User provided function apps registered with the static site. + /// The provider that submitted the last deployment to the primary environment of the static site. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) + { + tags ??= new Dictionary(); + customDomains ??= new List(); + privateEndpointConnections ??= new List(); + userProvidedFunctionApps ??= new List(); + + return new StaticSiteData(id, name, resourceType, systemData, tags, location, sku, identity, defaultHostname, repositoryUri, branch, customDomains?.ToList(), repositoryToken, buildProperties, privateEndpointConnections?.ToList(), stagingEnvironmentPolicy, allowConfigFileUpdates, templateProperties, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), provider, kind); + } + + /// Initializes a new instance of ResponseMessageEnvelopeRemotePrivateEndpointConnection. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. + /// Tags associated with resource. + /// Azure resource manager plan. + /// Resource specific properties. + /// SKU description of the resource. + /// Azure-AsyncOperation Status info. + /// Azure-AsyncOperation Error info. + /// MSI resource. + /// Logical Availability Zones the service is hosted in. + /// A new instance for mocking. + public static ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IReadOnlyDictionary tags = null, AppServiceArmPlan plan = null, RemotePrivateEndpointConnection properties = null, AppServiceSkuDescription sku = null, string status = null, ResponseError error = null, ManagedServiceIdentity identity = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ResponseMessageEnvelopeRemotePrivateEndpointConnection(id, name, resourceType, systemData, location, tags, plan, properties, sku, status, error, identity, zones?.ToList()); + } + + /// Initializes a new instance of AppServiceArmPlan. + /// The name. + /// The publisher. + /// The product. + /// The promotion code. + /// Version of product. + /// A new instance for mocking. + public static AppServiceArmPlan AppServiceArmPlan(string name = null, string publisher = null, string product = null, string promotionCode = null, string version = null) + { + return new AppServiceArmPlan(name, publisher, product, promotionCode, version); + } + + /// Initializes a new instance of RemotePrivateEndpointConnection. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// PrivateEndpoint of a remote private endpoint connection. + /// The state of a private link connection. + /// Private IPAddresses mapped to the remote private endpoint. + /// Kind of resource. + /// A new instance for mocking. + public static RemotePrivateEndpointConnection RemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null) + { + ipAddresses ??= new List(); + + return new RemotePrivateEndpointConnection(id, name, resourceType, systemData, provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, privateLinkServiceConnectionState, ipAddresses?.ToList(), kind); + } + + /// Initializes a new instance of StaticSiteUserProvidedFunctionAppData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the function app registered with the static site. + /// The region of the function app registered with the static site. + /// The date and time on which the function app was registered with the static site. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFunctionAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier functionAppResourceId = null, string functionAppRegion = null, DateTimeOffset? createdOn = null, string kind = null) + { + return new StaticSiteUserProvidedFunctionAppData(id, name, resourceType, systemData, functionAppResourceId, functionAppRegion, createdOn, kind); + } + + /// Initializes a new instance of StaticSitePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The default autogenerated hostname for the static site. + /// URL for the repository of the static site. + /// The target branch in the repository. + /// The custom domains associated with this static site. + /// A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + /// Build properties to configure on the repository. + /// Private endpoint connections. + /// State indicating whether staging environments are allowed or not allowed for a static web app. + /// <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. + /// Template options for generating a new repository. + /// The content distribution endpoint for the static site. + /// Identity to use for Key Vault Reference authentication. + /// User provided function apps registered with the static site. + /// The provider that submitted the last deployment to the primary environment of the static site. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) + { + customDomains ??= new List(); + privateEndpointConnections ??= new List(); + userProvidedFunctionApps ??= new List(); + + return new StaticSitePatch(id, name, resourceType, systemData, defaultHostname, repositoryUri, branch, customDomains?.ToList(), repositoryToken, buildProperties, privateEndpointConnections?.ToList(), stagingEnvironmentPolicy, allowConfigFileUpdates, templateProperties, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), provider, kind); + } + + /// Initializes a new instance of StaticSiteUser. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The identity provider for the static site user. + /// The user id for the static site user. + /// The display name for the static site user. + /// The roles for the static site user, in free-form string format. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteUser StaticSiteUser(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provider = null, string userId = null, string displayName = null, string roles = null, string kind = null) + { + return new StaticSiteUser(id, name, resourceType, systemData, provider, userId, displayName, roles, kind); + } + + /// Initializes a new instance of StaticSiteBuildData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// An identifier for the static site build. + /// The source branch. + /// The title of a pull request that a static site build is related to. + /// The hostname for a static site build. + /// When this build was created. + /// When this build was updated. + /// The status of the static site build. + /// User provided function apps registered with the static site build. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, string kind = null) + { + userProvidedFunctionApps ??= new List(); + + return new StaticSiteBuildData(id, name, resourceType, systemData, buildId, sourceBranch, pullRequestTitle, hostname, createdOn, lastUpdatedOn, status, userProvidedFunctionApps?.ToList(), kind); + } + + /// Initializes a new instance of AppServiceConfigurationDictionary. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Settings. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceConfigurationDictionary AppServiceConfigurationDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) + { + properties ??= new Dictionary(); + + return new AppServiceConfigurationDictionary(id, name, resourceType, systemData, properties, kind); + } + + /// Initializes a new instance of StaticSiteFunctionOverview. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name for the function. + /// The trigger type of the function. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteFunctionOverview StaticSiteFunctionOverview(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string functionName = null, FunctionTriggerType? triggerType = null, string kind = null) + { + return new StaticSiteFunctionOverview(id, name, resourceType, systemData, functionName, triggerType, kind); + } + + /// Initializes a new instance of StaticSiteZipDeployment. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// URL for the zipped app content. + /// URL for the zipped api content. + /// A title to label the deployment. + /// The provider submitting this deployment. + /// The language of the api content, if it exists. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteZipDeployment StaticSiteZipDeployment(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri appZipUri = null, Uri apiZipUri = null, string deploymentTitle = null, string provider = null, string functionLanguage = null, string kind = null) + { + return new StaticSiteZipDeployment(id, name, resourceType, systemData, appZipUri, apiZipUri, deploymentTitle, provider, functionLanguage, kind); + } + + /// Initializes a new instance of StaticSiteUserInvitationContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The domain name for the static site custom domain. + /// The identity provider for the static site user. + /// The user id for the static site user. + /// The roles for the static site user, in free-form string format. + /// The number of hours the sas token stays valid. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteUserInvitationContent StaticSiteUserInvitationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string domain = null, string provider = null, string userDetails = null, string roles = null, int? numHoursToExpiration = null, string kind = null) + { + return new StaticSiteUserInvitationContent(id, name, resourceType, systemData, domain, provider, userDetails, roles, numHoursToExpiration, kind); + } + + /// Initializes a new instance of StaticSiteUserInvitationResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The expiration time of the invitation. + /// The url for the invitation link. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteUserInvitationResult StaticSiteUserInvitationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? expiresOn = null, Uri invitationUri = null, string kind = null) + { + return new StaticSiteUserInvitationResult(id, name, resourceType, systemData, expiresOn, invitationUri, kind); + } + + /// Initializes a new instance of StaticSiteCustomDomainOverviewData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The domain name for the static site custom domain. + /// The date and time on which the custom domain was created for the static site. + /// The status of the custom domain. + /// The TXT record validation token. + /// + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteCustomDomainOverviewData StaticSiteCustomDomainOverviewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string domainName = null, DateTimeOffset? createdOn = null, CustomDomainStatus? status = null, string validationToken = null, string errorMessage = null, string kind = null) + { + return new StaticSiteCustomDomainOverviewData(id, name, resourceType, systemData, domainName, createdOn, status, validationToken, errorMessage, kind); + } + + /// Initializes a new instance of StaticSiteCustomDomainContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Validation method for adding a custom domain. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteCustomDomainContent StaticSiteCustomDomainContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string validationMethod = null, string kind = null) + { + return new StaticSiteCustomDomainContent(id, name, resourceType, systemData, validationMethod, kind); + } + + /// Initializes a new instance of StaticSiteStringList. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of string resources. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteStringList StaticSiteStringList(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable properties = null, string kind = null) + { + properties ??= new List(); + + return new StaticSiteStringList(id, name, resourceType, systemData, properties?.ToList(), kind); + } + + /// Initializes a new instance of StaticSiteResetContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The token which proves admin privileges to the repository. + /// Determines whether the repository should be updated with the new properties. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string repositoryToken = null, bool? shouldUpdateRepository = null, string kind = null) + { + return new StaticSiteResetContent(id, name, resourceType, systemData, repositoryToken, shouldUpdateRepository, kind); + } + + /// Initializes a new instance of SitePatchInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Managed service identity. + /// Current state of the app. + /// Hostnames associated with the app. + /// Name of the repository site. + /// State indicating whether the app has exceeded its quota usage. Read-only. + /// <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + /// + /// Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + /// the app is not served on those hostnames. + /// + /// Management information availability state for the app. + /// Hostname SSL states are used to manage the SSL bindings for app's hostnames. + /// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + /// <code>true</code> if reserved; otherwise, <code>false</code>. + /// Obsolete: Hyper-V sandbox. + /// Hyper-V sandbox. + /// Last time the app was modified, in UTC. Read-only. + /// Configuration of the app. + /// Azure Traffic Manager hostnames associated with the app. Read-only. + /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + /// Specifies which deployment slot this app will swap into. Read-only. + /// App Service Environment to use for the app. + /// <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. + /// <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + /// + /// This composes with ClientCertEnabled setting. + /// - ClientCertEnabled: false means ClientCert is ignored. + /// - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + /// - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + /// + /// client certificate authentication comma-separated exclusion paths. + /// + /// <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. + /// If <code>true</code>, the app is only accessible via API management process. + /// + /// Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + /// List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + /// Size of the function container. + /// Maximum allowed daily memory-time quota (applicable on dynamic apps only). + /// App suspended till in case memory-time quota is exceeded. + /// + /// Maximum number of workers. + /// This only applies to Functions container. + /// + /// If specified during app creation, the app is cloned from a source app. + /// Name of the resource group the app belongs to. Read-only. + /// <code>true</code> if the app is a default container; otherwise, <code>false</code>. + /// Default hostname of the app. Read-only. + /// Status of the last deployment slot swap operation. + /// + /// HttpsOnly: configures a web site to accept only https requests. Issues redirect for + /// http requests + /// + /// Site redundancy mode. + /// Specifies an operation id if this site has a pending operation. + /// Checks if Customer provided storage account is required. + /// Identity to use for Key Vault Reference authentication. + /// + /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. + /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + /// + /// Kind of resource. + /// A new instance for mocking. + public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + { + hostNames ??= new List(); + enabledHostNames ??= new List(); + hostNameSslStates ??= new List(); + trafficManagerHostNames ??= new List(); + + return new SitePatchInfo(id, name, resourceType, systemData, identity, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), serverFarmId, isReserved, isXenon, isHyperV, lastModifiedOn, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind); + } + + /// Initializes a new instance of CustomHostnameAnalysisResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// <code>true</code> if hostname is already verified; otherwise, <code>false</code>. + /// DNS verification test result. + /// Raw failure information if DNS verification fails. + /// <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>. + /// <code>true</code> if there is a conflict across subscriptions; otherwise, <code>false</code>. + /// Name of the conflicting app on scale unit if it's within the same subscription. + /// CName records controller can see for this hostname. + /// TXT records controller can see for this hostname. + /// A records controller can see for this hostname. + /// Alternate CName records controller can see for this hostname. + /// Alternate TXT records controller can see for this hostname. + /// Kind of resource. + /// A new instance for mocking. + public static CustomHostnameAnalysisResult CustomHostnameAnalysisResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isHostnameAlreadyVerified = null, DnsVerificationTestResult? customDomainVerificationTest = null, ResponseError customDomainVerificationFailureInfo = null, bool? hasConflictOnScaleUnit = null, bool? hasConflictAcrossSubscription = null, string conflictingAppResourceId = null, IEnumerable cNameRecords = null, IEnumerable txtRecords = null, IEnumerable aRecords = null, IEnumerable alternateCNameRecords = null, IEnumerable alternateTxtRecords = null, string kind = null) + { + cNameRecords ??= new List(); + txtRecords ??= new List(); + aRecords ??= new List(); + alternateCNameRecords ??= new List(); + alternateTxtRecords ??= new List(); + + return new CustomHostnameAnalysisResult(id, name, resourceType, systemData, isHostnameAlreadyVerified, customDomainVerificationTest, customDomainVerificationFailureInfo, hasConflictOnScaleUnit, hasConflictAcrossSubscription, conflictingAppResourceId, cNameRecords?.ToList(), txtRecords?.ToList(), aRecords?.ToList(), alternateCNameRecords?.ToList(), alternateTxtRecords?.ToList(), kind); + } + + /// Initializes a new instance of WebAppBackupInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Name of the backup. + /// True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. + /// SAS URL to the container. + /// Schedule for the backup if it is executed periodically. + /// Databases included in the backup. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppBackupInfo WebAppBackupInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupName = null, bool? isEnabled = null, Uri storageAccountUri = null, WebAppBackupSchedule backupSchedule = null, IEnumerable databases = null, string kind = null) + { + databases ??= new List(); + + return new WebAppBackupInfo(id, name, resourceType, systemData, backupName, isEnabled, storageAccountUri, backupSchedule, databases?.ToList(), kind); + } + + /// Initializes a new instance of WebAppBackupSchedule. + /// How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day). + /// The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). + /// True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. + /// After how many days backups should be deleted. + /// When the schedule should start working. + /// Last time when this schedule was triggered. + /// A new instance for mocking. + public static WebAppBackupSchedule WebAppBackupSchedule(int frequencyInterval = default, BackupFrequencyUnit frequencyUnit = default, bool shouldKeepAtLeastOneBackup = default, int retentionPeriodInDays = default, DateTimeOffset? startOn = null, DateTimeOffset? lastExecutedOn = null) + { + return new WebAppBackupSchedule(frequencyInterval, frequencyUnit, shouldKeepAtLeastOneBackup, retentionPeriodInDays, startOn, lastExecutedOn); + } + + /// Initializes a new instance of WebAppBackupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Id of the backup. + /// SAS URL for the storage account container which contains this backup. + /// Name of the blob which contains data for this backup. + /// Name of this backup. + /// Backup status. + /// Size of the backup in bytes. + /// Timestamp of the backup creation. + /// Details regarding this backup. Might contain an error message. + /// List of databases included in the backup. + /// True if this backup has been created due to a schedule being triggered. + /// Timestamp of a last restore operation which used this backup. + /// Timestamp when this backup finished. + /// Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. + /// Size of the original web app which has been backed up. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppBackupData WebAppBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? backupId = null, Uri storageAccountUri = null, string blobName = null, string backupName = null, WebAppBackupStatus? status = null, long? sizeInBytes = null, DateTimeOffset? createdOn = null, string log = null, IEnumerable databases = null, bool? isScheduled = null, DateTimeOffset? lastRestoreOn = null, DateTimeOffset? finishedOn = null, string correlationId = null, long? websiteSizeInBytes = null, string kind = null) + { + databases ??= new List(); + + return new WebAppBackupData(id, name, resourceType, systemData, backupId, storageAccountUri, blobName, backupName, status, sizeInBytes, createdOn, log, databases?.ToList(), isScheduled, lastRestoreOn, finishedOn, correlationId, websiteSizeInBytes, kind); + } + + /// Initializes a new instance of RestoreRequestInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SAS URL to the container. + /// Name of a blob which contains the backup. + /// <code>true</code> if the restore operation can overwrite target app; otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an existing app. + /// Name of an app. + /// Collection of databases which should be restored. This list has to match the list of databases included in the backup. + /// + /// Changes a logic when restoring an app with custom domains. <code>true</code> to remove custom domains automatically. If <code>false</code>, custom domains are added to + /// the app's object when it is being restored, but that might fail due to conflicts during the operation. + /// + /// Ignore the databases and only restore the site content. + /// Specify app service plan that will own restored site. + /// Operation type. + /// <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. + /// App Service Environment name, if needed (only when restoring an app to an App Service Environment). + /// Kind of resource. + /// A new instance for mocking. + public static RestoreRequestInfo RestoreRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri storageAccountUri = null, string blobName = null, bool? canOverwrite = null, string siteName = null, IEnumerable databases = null, bool? ignoreConflictingHostNames = null, bool? ignoreDatabases = null, string appServicePlan = null, BackupRestoreOperationType? operationType = null, bool? adjustConnectionStrings = null, string hostingEnvironment = null, string kind = null) + { + databases ??= new List(); + + return new RestoreRequestInfo(id, name, resourceType, systemData, storageAccountUri, blobName, canOverwrite, siteName, databases?.ToList(), ignoreConflictingHostNames, ignoreDatabases, appServicePlan, operationType, adjustConnectionStrings, hostingEnvironment, kind); + } + + /// Initializes a new instance of CsmPublishingCredentialsPoliciesEntityData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// <code>true</code> to allow access to a publishing method; otherwise, <code>false</code>. + /// Kind of resource. + /// A new instance for mocking. + public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredentialsPoliciesEntityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? allow = null, string kind = null) + { + return new CsmPublishingCredentialsPoliciesEntityData(id, name, resourceType, systemData, allow, kind); + } + + /// Initializes a new instance of SiteConfigData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Number of workers. + /// Default documents. + /// .NET Framework version. + /// Version of PHP. + /// Version of Python. + /// Version of Node.js. + /// Version of PowerShell. + /// Linux App Framework and version. + /// Xenon App Framework and version. + /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + /// Request tracing expiration time. + /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + /// Remote debugging version. + /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + /// Flag to use Managed Identity Creds for ACR pull. + /// If using user managed identity, the user managed identity ClientId. + /// HTTP logs directory size limit. + /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + /// Publishing user name. + /// Application settings. + /// Connection strings. + /// Site MachineKey. + /// Handler mappings. + /// Document root. + /// SCM type. + /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + /// Java version. + /// Java container. + /// Java container version. + /// App command line to launch. + /// Managed pipeline mode. + /// Virtual applications. + /// Site load balancing. + /// This is work around for polymorphic types. + /// Site limits. + /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + /// Auto Heal rules. + /// Tracing options. + /// Virtual Network name. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. + /// Cross-Origin Resource Sharing (CORS) settings. + /// Push endpoint settings. + /// Information about the formal API definition for the app. + /// Azure API management settings linked to the app. + /// Auto-swap slot name. + /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + /// Managed Service Identity Id. + /// Explicit Managed Service Identity Id. + /// Identity to use for Key Vault Reference authentication. + /// IP security restrictions for main. + /// IP security restrictions for scm. + /// IP security restrictions for scm to use main. + /// Http20Enabled: configures a web site to allow clients to connect over http2.0. + /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. + /// State of FTP / FTPS service. + /// + /// Number of preWarmed instances. + /// This setting only applies to the Consumption and Elastic Plans + /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium Plans + /// + /// Health check path. + /// + /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but will instead call to the + /// runtime to get scale status. + /// + /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// + /// Number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + /// List of Azure Storage Accounts. + /// Property to allow or block all public traffic. + /// Kind of resource. + /// A new instance for mocking. + public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) + { + defaultDocuments ??= new List(); + appSettings ??= new List(); + connectionStrings ??= new List(); + handlerMappings ??= new List(); + virtualApplications ??= new List(); + experimentsRampUpRules ??= new List(); + ipSecurityRestrictions ??= new List(); + scmIPSecurityRestrictions ??= new List(); + azureStorageAccounts ??= new Dictionary(); + + return new SiteConfigData(id, name, resourceType, systemData, numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess, kind); + } + + /// Initializes a new instance of SiteAuthSettings. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// <code>true</code> if the Authentication / Authorization feature is enabled for the current app; otherwise, <code>false</code>. + /// + /// The RuntimeVersion of the Authentication / Authorization feature in use for the current app. + /// The setting in this value can control the behavior of certain features in the Authentication / Authorization module. + /// + /// The action to take when an unauthenticated client attempts to access the app. + /// + /// <code>true</code> to durably store platform-specific security tokens that are obtained during login flows; otherwise, <code>false</code>. + /// The default is <code>false</code>. + /// + /// + /// External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. + /// This is an advanced setting typically only needed by Windows Store application backends. + /// Note that URLs within the current domain are always implicitly allowed. + /// + /// + /// The default authentication provider to use when multiple providers are configured. + /// This setting is only needed if multiple providers are configured and the unauthenticated client + /// action is set to "RedirectToLoginPage". + /// + /// + /// The number of hours after session token expiration that a session token can be used to + /// call the token refresh API. The default is 72 hours. + /// + /// + /// The Client ID of this relying party application, known as the client_id. + /// This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + /// other 3rd party OpenID Connect providers. + /// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + /// + /// + /// The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). + /// This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. + /// Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. + /// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + /// + /// The app setting name that contains the client secret of the relying party application. + /// + /// An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + /// a replacement for the Client Secret. It is also optional. + /// + /// + /// The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. + /// When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. + /// This URI is a case-sensitive identifier for the token issuer. + /// More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html + /// + /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. + /// + /// Allowed audience values to consider when validating JWTs issued by + /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an + /// allowed audience, regardless of this setting. + /// + /// + /// Login parameters to send to the OpenID Connect authorization endpoint when + /// a user logs in. Each parameter must be in the form "key=value". + /// + /// Gets a JSON string containing the Azure AD Acl settings. + /// + /// The OpenID Connect Client ID for the Google web application. + /// This setting is required for enabling Google Sign-In. + /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + /// + /// + /// The client secret associated with the Google web application. + /// This setting is required for enabling Google Sign-In. + /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + /// + /// + /// The app setting name that contains the client secret associated with + /// the Google web application. + /// + /// + /// The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. + /// This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. + /// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + /// + /// + /// The App ID of the Facebook app used for login. + /// This setting is required for enabling Facebook Login. + /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + /// + /// + /// The App Secret of the Facebook app used for Facebook Login. + /// This setting is required for enabling Facebook Login. + /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + /// + /// The app setting name that contains the app secret used for Facebook Login. + /// + /// The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. + /// This setting is optional. + /// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + /// + /// + /// The Client Id of the GitHub app used for login. + /// This setting is required for enabling Github login + /// + /// + /// The Client Secret of the GitHub app used for Github Login. + /// This setting is required for enabling Github login. + /// + /// + /// The app setting name that contains the client secret of the Github + /// app used for GitHub Login. + /// + /// + /// The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. + /// This setting is optional + /// + /// + /// The OAuth 1.0a consumer key of the Twitter application used for sign-in. + /// This setting is required for enabling Twitter Sign-In. + /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + /// + /// + /// The OAuth 1.0a consumer secret of the Twitter application used for sign-in. + /// This setting is required for enabling Twitter Sign-In. + /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + /// + /// + /// The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + /// application used for sign-in. + /// + /// + /// The OAuth 2.0 client ID that was created for the app used for authentication. + /// This setting is required for enabling Microsoft Account authentication. + /// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm + /// + /// + /// The OAuth 2.0 client secret that was created for the app used for authentication. + /// This setting is required for enabling Microsoft Account authentication. + /// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm + /// + /// + /// The app setting name containing the OAuth 2.0 client secret that was created for the + /// app used for authentication. + /// + /// + /// The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. + /// This setting is optional. If not specified, "wl.basic" is used as the default scope. + /// Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx + /// + /// + /// "true" if the auth config settings should be read from a file, + /// "false" otherwise + /// + /// + /// The path of the config file containing auth settings. + /// If the path is relative, base will the site's root directory. + /// + /// + /// The ConfigVersion of the Authentication / Authorization feature in use for the current app. + /// The setting in this value can control the behavior of the control plane for Authentication / Authorization. + /// + /// Kind of resource. + /// A new instance for mocking. + public static SiteAuthSettings SiteAuthSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null, string runtimeVersion = null, UnauthenticatedClientAction? unauthenticatedClientAction = null, bool? isTokenStoreEnabled = null, IEnumerable allowedExternalRedirectUrls = null, BuiltInAuthenticationProvider? defaultProvider = null, double? tokenRefreshExtensionHours = null, string clientId = null, string clientSecret = null, string clientSecretSettingName = null, string clientSecretCertificateThumbprintString = null, string issuer = null, bool? validateIssuer = null, IEnumerable allowedAudiences = null, IEnumerable additionalLoginParams = null, string aadClaimsAuthorization = null, string googleClientId = null, string googleClientSecret = null, string googleClientSecretSettingName = null, IEnumerable googleOAuthScopes = null, string facebookAppId = null, string facebookAppSecret = null, string facebookAppSecretSettingName = null, IEnumerable facebookOAuthScopes = null, string gitHubClientId = null, string gitHubClientSecret = null, string gitHubClientSecretSettingName = null, IEnumerable gitHubOAuthScopes = null, string twitterConsumerKey = null, string twitterConsumerSecret = null, string twitterConsumerSecretSettingName = null, string microsoftAccountClientId = null, string microsoftAccountClientSecret = null, string microsoftAccountClientSecretSettingName = null, IEnumerable microsoftAccountOAuthScopes = null, string isAuthFromFile = null, string authFilePath = null, string configVersion = null, string kind = null) + { + allowedExternalRedirectUrls ??= new List(); + allowedAudiences ??= new List(); + additionalLoginParams ??= new List(); + googleOAuthScopes ??= new List(); + facebookOAuthScopes ??= new List(); + gitHubOAuthScopes ??= new List(); + microsoftAccountOAuthScopes ??= new List(); + + return new SiteAuthSettings(id, name, resourceType, systemData, isEnabled, runtimeVersion, unauthenticatedClientAction, isTokenStoreEnabled, allowedExternalRedirectUrls?.ToList(), defaultProvider, tokenRefreshExtensionHours, clientId, clientSecret, clientSecretSettingName, clientSecretCertificateThumbprintString, issuer, validateIssuer, allowedAudiences?.ToList(), additionalLoginParams?.ToList(), aadClaimsAuthorization, googleClientId, googleClientSecret, googleClientSecretSettingName, googleOAuthScopes?.ToList(), facebookAppId, facebookAppSecret, facebookAppSecretSettingName, facebookOAuthScopes?.ToList(), gitHubClientId, gitHubClientSecret, gitHubClientSecretSettingName, gitHubOAuthScopes?.ToList(), twitterConsumerKey, twitterConsumerSecret, twitterConsumerSecretSettingName, microsoftAccountClientId, microsoftAccountClientSecret, microsoftAccountClientSecretSettingName, microsoftAccountOAuthScopes?.ToList(), isAuthFromFile, authFilePath, configVersion, kind); + } + + /// Initializes a new instance of SiteAuthSettingsV2. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The configuration settings of the platform of App Service Authentication/Authorization. + /// The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. + /// The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. + /// The configuration settings of the login flow of users using App Service Authentication/Authorization. + /// The configuration settings of the HTTP requests for authentication and authorization requests made against App Service Authentication/Authorization. + /// Kind of resource. + /// A new instance for mocking. + public static SiteAuthSettingsV2 SiteAuthSettingsV2(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AuthPlatform platform = null, GlobalValidation globalValidation = null, AppServiceIdentityProviders identityProviders = null, WebAppLoginInfo login = null, AppServiceHttpSettings httpSettings = null, string kind = null) + { + return new SiteAuthSettingsV2(id, name, resourceType, systemData, platform, globalValidation, identityProviders, login, httpSettings, kind); + } + + /// Initializes a new instance of AzureStoragePropertyDictionary. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Azure storage accounts. + /// Kind of resource. + /// A new instance for mocking. + public static AzureStoragePropertyDictionary AzureStoragePropertyDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) + { + properties ??= new Dictionary(); + + return new AzureStoragePropertyDictionary(id, name, resourceType, systemData, properties, kind); + } + + /// Initializes a new instance of ApiKeyVaultReferenceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// + /// + /// Managed service identity. + /// + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static ApiKeyVaultReferenceData ApiKeyVaultReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string reference = null, ResolveStatus? status = null, string vaultName = null, string secretName = null, string secretVersion = null, ManagedServiceIdentity identity = null, string details = null, ConfigReferenceSource? source = null, string activeVersion = null, string kind = null) + { + return new ApiKeyVaultReferenceData(id, name, resourceType, systemData, reference, status, vaultName, secretName, secretVersion, identity, details, source, activeVersion, kind); + } + + /// Initializes a new instance of ConnectionStringDictionary. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Connection strings. + /// Kind of resource. + /// A new instance for mocking. + public static ConnectionStringDictionary ConnectionStringDictionary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, string kind = null) + { + properties ??= new Dictionary(); + + return new ConnectionStringDictionary(id, name, resourceType, systemData, properties, kind); + } + + /// Initializes a new instance of SiteLogsConfigData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application logs configuration. + /// HTTP logs configuration. + /// Failed requests tracing configuration. + /// Detailed error messages configuration. + /// Kind of resource. + /// A new instance for mocking. + public static SiteLogsConfigData SiteLogsConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApplicationLogsConfig applicationLogs = null, AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = null, bool? isDetailedErrorMessagesEnabled = null, string kind = null) + { + return new SiteLogsConfigData(id, name, resourceType, systemData, applicationLogs, httpLogs, isFailedRequestsTracingEnabled != null ? new WebAppEnabledConfig(isFailedRequestsTracingEnabled) : null, isDetailedErrorMessagesEnabled != null ? new WebAppEnabledConfig(isDetailedErrorMessagesEnabled) : null, kind); + } + + /// Initializes a new instance of SlotConfigNamesResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of connection string names. + /// List of application settings names. + /// List of external Azure storage account identifiers. + /// Kind of resource. + /// A new instance for mocking. + public static SlotConfigNamesResourceData SlotConfigNamesResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable connectionStringNames = null, IEnumerable appSettingNames = null, IEnumerable azureStorageConfigNames = null, string kind = null) + { + connectionStringNames ??= new List(); + appSettingNames ??= new List(); + azureStorageConfigNames ??= new List(); + + return new SlotConfigNamesResourceData(id, name, resourceType, systemData, connectionStringNames?.ToList(), appSettingNames?.ToList(), azureStorageConfigNames?.ToList(), kind); + } + + /// Initializes a new instance of SiteConfigurationSnapshotInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The time the snapshot was taken. + /// The id of the snapshot. + /// Kind of resource. + /// A new instance for mocking. + public static SiteConfigurationSnapshotInfo SiteConfigurationSnapshotInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? snapshotTakenOn = null, int? snapshotId = null, string kind = null) + { + return new SiteConfigurationSnapshotInfo(id, name, resourceType, systemData, snapshotTakenOn, snapshotId, kind); + } + + /// Initializes a new instance of ContinuousWebJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Job status. + /// Detailed status. + /// Log URL. + /// Run command. + /// Job URL. + /// Extra Info URL. + /// Job type. + /// Error information. + /// Using SDK?. + /// Job settings. + /// Kind of resource. + /// A new instance for mocking. + public static ContinuousWebJobData ContinuousWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContinuousWebJobStatus? status = null, string detailedStatus = null, Uri logUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) + { + settings ??= new Dictionary(); + + return new ContinuousWebJobData(id, name, resourceType, systemData, status, detailedStatus, logUri, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); + } + + /// Initializes a new instance of WebAppDeploymentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Deployment status. + /// Details about deployment status. + /// Who authored the deployment. + /// Who performed the deployment. + /// Author email. + /// Start time. + /// End time. + /// True if deployment is currently active, false if completed and null if not started. + /// Details on deployment. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppDeploymentData WebAppDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? status = null, string message = null, string author = null, string deployer = null, string authorEmail = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? isActive = null, string details = null, string kind = null) + { + return new WebAppDeploymentData(id, name, resourceType, systemData, status, message, author, deployer, authorEmail, startOn, endOn, isActive, details, kind); + } + + /// Initializes a new instance of MSDeployStatusData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Username of deployer. + /// Provisioning state. + /// Start time of deploy operation. + /// End time of deploy operation. + /// Whether the deployment operation has completed. + /// Kind of resource. + /// A new instance for mocking. + public static MSDeployStatusData MSDeployStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string deployer = null, MSDeployProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? isComplete = null, string kind = null) + { + return new MSDeployStatusData(id, name, resourceType, systemData, deployer, provisioningState, startOn, endOn, isComplete, kind); + } + + /// Initializes a new instance of WebAppMSDeploy. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Package URI. + /// SQL Connection String. + /// Database Type. + /// URI of MSDeploy Parameters file. Must not be set if SetParameters is used. + /// MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + /// + /// Controls whether the MSDeploy operation skips the App_Data directory. + /// If set to <code>true</code>, the existing App_Data directory on the destination + /// will not be deleted, and any App_Data directory in the source will be ignored. + /// Setting is <code>false</code> by default. + /// + /// + /// Sets the AppOffline rule while the MSDeploy operation executes. + /// Setting is <code>false</code> by default. + /// + /// Kind of resource. + /// A new instance for mocking. + public static WebAppMSDeploy WebAppMSDeploy(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri packageUri = null, string connectionString = null, string dbType = null, Uri setParametersXmlFileUri = null, IDictionary setParameters = null, bool? skipAppData = null, bool? isAppOffline = null, string kind = null) + { + setParameters ??= new Dictionary(); + + return new WebAppMSDeploy(id, name, resourceType, systemData, packageUri, connectionString, dbType, setParametersXmlFileUri, setParameters, skipAppData, isAppOffline, kind); + } + + /// Initializes a new instance of WebAppMSDeployLog. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of log entry messages. + /// Kind of resource. + /// A new instance for mocking. + public static WebAppMSDeployLog WebAppMSDeployLog(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable entries = null, string kind = null) + { + entries ??= new List(); + + return new WebAppMSDeployLog(id, name, resourceType, systemData, entries?.ToList(), kind); + } + + /// Initializes a new instance of WebAppMSDeployLogEntry. + /// Timestamp of log entry. + /// Log entry type. + /// Log entry message. + /// A new instance for mocking. + public static WebAppMSDeployLogEntry WebAppMSDeployLogEntry(DateTimeOffset? time = null, WebAppMSDeployLogEntryType? entryType = null, string message = null) + { + return new WebAppMSDeployLogEntry(time, entryType, message); + } + + /// Initializes a new instance of FunctionEnvelopeData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Function App ID. + /// Script root path URI. + /// Script URI. + /// Config URI. + /// Test data URI. + /// Secrets file URI. + /// Function URI. + /// Config information. + /// File list. + /// Test data used when testing via the Azure Portal. + /// The invocation URL. + /// The function language. + /// Gets or sets a value indicating whether the function is disabled. + /// Kind of resource. + /// A new instance for mocking. + public static FunctionEnvelopeData FunctionEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string functionAppId = null, string scriptRootPathHref = null, string scriptHref = null, string configHref = null, string testDataHref = null, string secretsFileHref = null, string href = null, BinaryData config = null, IDictionary files = null, string testData = null, string invokeUrlTemplate = null, string language = null, bool? isDisabled = null, string kind = null) + { + files ??= new Dictionary(); + + return new FunctionEnvelopeData(id, name, resourceType, systemData, functionAppId, scriptRootPathHref, scriptHref, configHref, testDataHref, secretsFileHref, href, config, files, testData, invokeUrlTemplate, language, isDisabled, kind); + } + + /// Initializes a new instance of FunctionSecrets. + /// Secret key. + /// Trigger URL. + /// A new instance for mocking. + public static FunctionSecrets FunctionSecrets(string key = null, Uri triggerUri = null) + { + return new FunctionSecrets(key, triggerUri); + } + + /// Initializes a new instance of FunctionAppHostKeys. + /// Secret key. + /// Host level function keys. + /// System keys. + /// A new instance for mocking. + public static FunctionAppHostKeys FunctionAppHostKeys(string masterKey = null, IReadOnlyDictionary functionKeys = null, IReadOnlyDictionary systemKeys = null) + { + functionKeys ??= new Dictionary(); + systemKeys ??= new Dictionary(); + + return new FunctionAppHostKeys(masterKey, functionKeys, systemKeys); + } + + /// Initializes a new instance of HostNameBindingData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// App Service app name. + /// Fully qualified ARM domain resource URI. + /// Azure resource name. + /// Azure resource type. + /// Custom DNS record type. + /// Hostname type. + /// SSL type. + /// SSL certificate thumbprint. + /// Virtual IP address assigned to the hostname if IP based SSL is enabled. + /// Kind of resource. + /// A new instance for mocking. + public static HostNameBindingData HostNameBindingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string siteName = null, string domainId = null, string azureResourceName = null, AppServiceResourceType? azureResourceType = null, CustomHostNameDnsRecordType? customHostNameDnsRecordType = null, AppServiceHostNameType? hostNameType = null, HostNameBindingSslState? sslState = null, string thumbprintString = null, string virtualIP = null, string kind = null) + { + return new HostNameBindingData(id, name, resourceType, systemData, siteName, domainId, azureResourceName, azureResourceType, customHostNameDnsRecordType, hostNameType, sslState, thumbprintString, virtualIP, kind); + } + + /// Initializes a new instance of RelayServiceConnectionEntityData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static RelayServiceConnectionEntityData RelayServiceConnectionEntityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string entityName = null, string entityConnectionString = null, string resourceConnectionString = null, string hostname = null, int? port = null, Uri biztalkUri = null, string kind = null) + { + return new RelayServiceConnectionEntityData(id, name, resourceType, systemData, entityName, entityConnectionString, resourceConnectionString, hostname, port, biztalkUri, kind); + } + + /// Initializes a new instance of WebSiteInstanceStatusData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Link to the GetStatusApi in Kudu. + /// Link to the Diagnose and Solve Portal. + /// Link to the console to web app instance. + /// Link to the console to web app instance. + /// Dictionary of <ContainerInfo>. + /// Kind of resource. + /// A new instance for mocking. + public static WebSiteInstanceStatusData WebSiteInstanceStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRuntimeState? state = null, Uri statusUri = null, Uri detectorUri = null, Uri consoleUri = null, string healthCheckUrlString = null, IDictionary containers = null, string kind = null) + { + containers ??= new Dictionary(); + + return new WebSiteInstanceStatusData(id, name, resourceType, systemData, state, statusUri, detectorUri, consoleUri, healthCheckUrlString, containers, kind); + } + + /// Initializes a new instance of ProcessInfoData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ARM Identifier for deployment. + /// Deployment name. + /// HRef URI. + /// Minidump URI. + /// Is profile running?. + /// Is the IIS Profile running?. + /// IIS Profile timeout (seconds). + /// Parent process. + /// Child process list. + /// Thread list. + /// List of open files. + /// List of modules. + /// File name of this process. + /// Command line. + /// User name. + /// Handle count. + /// Module count. + /// Thread count. + /// Start time. + /// Total CPU time. + /// User CPU time. + /// Privileged CPU time. + /// Working set. + /// Peak working set. + /// Private memory size. + /// Virtual memory size. + /// Peak virtual memory usage. + /// Paged system memory. + /// Non-paged system memory. + /// Paged memory. + /// Peak paged memory. + /// Time stamp. + /// List of environment variables. + /// Is this the SCM site?. + /// Is this a Web Job?. + /// Description of process. + /// Kind of resource. + /// A new instance for mocking. + public static ProcessInfoData ProcessInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? identifier = null, string deploymentName = null, string href = null, string minidump = null, bool? isProfileRunning = null, bool? isIisProfileRunning = null, double? iisProfileTimeoutInSeconds = null, string parent = null, IEnumerable children = null, IEnumerable threads = null, IEnumerable openFileHandles = null, IEnumerable modules = null, string fileName = null, string commandLine = null, string userName = null, int? handleCount = null, int? moduleCount = null, int? threadCount = null, DateTimeOffset? startOn = null, string totalCpuTime = null, string userCpuTime = null, string privilegedCpuTime = null, long? workingSet = null, long? peakWorkingSet = null, long? privateMemory = null, long? virtualMemory = null, long? peakVirtualMemory = null, long? pagedSystemMemory = null, long? nonPagedSystemMemory = null, long? pagedMemory = null, long? peakPagedMemory = null, DateTimeOffset? timeStamp = null, IDictionary environmentVariables = null, bool? isScmSite = null, bool? isWebjob = null, string description = null, string kind = null) + { + children ??= new List(); + threads ??= new List(); + openFileHandles ??= new List(); + modules ??= new List(); + environmentVariables ??= new Dictionary(); + + return new ProcessInfoData(id, name, resourceType, systemData, identifier, deploymentName, href, minidump, isProfileRunning, isIisProfileRunning, iisProfileTimeoutInSeconds, parent, children?.ToList(), threads?.ToList(), openFileHandles?.ToList(), modules?.ToList(), fileName, commandLine, userName, handleCount, moduleCount, threadCount, startOn, totalCpuTime, userCpuTime, privilegedCpuTime, workingSet, peakWorkingSet, privateMemory, virtualMemory, peakVirtualMemory, pagedSystemMemory, nonPagedSystemMemory, pagedMemory, peakPagedMemory, timeStamp, environmentVariables, isScmSite, isWebjob, description, kind); + } + + /// Initializes a new instance of ProcessThreadInfo. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Site extension ID. + /// HRef URI. + /// Process URI. + /// Start address. + /// Current thread priority. + /// Thread priority level. + /// Base priority. + /// Start time. + /// Total processor time. + /// User processor time. + /// Thread state. + /// Wait reason. + /// Kind of resource. + /// A new instance for mocking. + public static ProcessThreadInfo ProcessThreadInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? identifier = null, string href = null, string process = null, string startAddress = null, int? currentPriority = null, string priorityLevel = null, int? basePriority = null, DateTimeOffset? startOn = null, string totalProcessorTime = null, string userProcessorTime = null, string state = null, string waitReason = null, string kind = null) + { + return new ProcessThreadInfo(id, name, resourceType, systemData, identifier, href, process, startAddress, currentPriority, priorityLevel, basePriority, startOn, totalProcessorTime, userProcessorTime, state, waitReason, kind); + } + + /// Initializes a new instance of ProcessModuleInfoData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Base address. Used as module identifier in ARM resource URI. + /// File name. + /// HRef URI. + /// File path. + /// Module memory size. + /// File version. + /// File description. + /// Product name. + /// Product version. + /// Is debug?. + /// Module language (locale). + /// Kind of resource. + /// A new instance for mocking. + public static ProcessModuleInfoData ProcessModuleInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string baseAddress = null, string fileName = null, string href = null, string filePath = null, int? moduleMemorySize = null, string fileVersion = null, string fileDescription = null, string product = null, string productVersion = null, bool? isDebug = null, string language = null, string kind = null) + { + return new ProcessModuleInfoData(id, name, resourceType, systemData, baseAddress, fileName, href, filePath, moduleMemorySize, fileVersion, fileDescription, product, productVersion, isDebug, language, kind); + } + + /// Initializes a new instance of SiteCloneability. + /// Name of app. + /// List of features enabled on app that prevent cloning. + /// + /// List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned + /// but the features in this list will not be set up on cloned app. + /// + /// List of blocking application characteristics. + /// A new instance for mocking. + public static SiteCloneability SiteCloneability(CloneAbilityResult? result = null, IEnumerable blockingFeatures = null, IEnumerable unsupportedFeatures = null, IEnumerable blockingCharacteristics = null) + { + blockingFeatures ??= new List(); + unsupportedFeatures ??= new List(); + blockingCharacteristics ??= new List(); + + return new SiteCloneability(result, blockingFeatures?.ToList(), unsupportedFeatures?.ToList(), blockingCharacteristics?.ToList()); + } + + /// Initializes a new instance of SiteCloneabilityCriterion. + /// Name of criterion. + /// Description of criterion. + /// A new instance for mocking. + public static SiteCloneabilityCriterion SiteCloneabilityCriterion(string name = null, string description = null) + { + return new SiteCloneabilityCriterion(name, description); + } + + /// Initializes a new instance of StorageMigrationContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// AzureFiles connection string. + /// AzureFiles share. + /// <code>true</code>if the app should be switched over; otherwise, <code>false</code>. + /// <code>true</code> if the app should be read only during copy operation; otherwise, <code>false</code>. + /// Kind of resource. + /// A new instance for mocking. + public static StorageMigrationContent StorageMigrationContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string azurefilesConnectionString = null, string azurefilesShare = null, bool? switchSiteAfterMigration = null, bool? blockWriteAccessToSite = null, string kind = null) + { + return new StorageMigrationContent(id, name, resourceType, systemData, azurefilesConnectionString, azurefilesShare, switchSiteAfterMigration, blockWriteAccessToSite, kind); + } + + /// Initializes a new instance of StorageMigrationResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// When server starts the migration process, it will return an operation ID identifying that particular migration operation. + /// Kind of resource. + /// A new instance for mocking. + public static StorageMigrationResult StorageMigrationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string operationId = null, string kind = null) + { + return new StorageMigrationResult(id, name, resourceType, systemData, operationId, kind); + } + + /// Initializes a new instance of MigrateMySqlContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Connection string to the remote MySQL database. + /// The type of migration operation to be done. + /// Kind of resource. + /// A new instance for mocking. + public static MigrateMySqlContent MigrateMySqlContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string connectionString = null, MySqlMigrationType? migrationType = null, string kind = null) + { + return new MigrateMySqlContent(id, name, resourceType, systemData, connectionString, migrationType, kind); + } + + /// Initializes a new instance of MigrateMySqlStatusData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Status of the migration task. + /// Operation ID for the migration task. + /// True if the web app has in app MySql enabled. + /// Kind of resource. + /// A new instance for mocking. + public static MigrateMySqlStatusData MigrateMySqlStatusData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppServiceOperationStatus? migrationOperationStatus = null, string operationId = null, bool? isLocalMySqlEnabled = null, string kind = null) + { + return new MigrateMySqlStatusData(id, name, resourceType, systemData, migrationOperationStatus, operationId, isLocalMySqlEnabled, kind); + } + + /// Initializes a new instance of SwiftVirtualNetworkData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + /// A flag that specifies if the scale unit this Web App is on supports Swift integration. + /// Kind of resource. + /// A new instance for mocking. + public static SwiftVirtualNetworkData SwiftVirtualNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier subnetResourceId = null, bool? isSwiftSupported = null, string kind = null) + { + return new SwiftVirtualNetworkData(id, name, resourceType, systemData, subnetResourceId, isSwiftSupported, kind); + } + + /// Initializes a new instance of NetworkFeatureData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Virtual Network name. + /// The Virtual Network summary view. + /// The Hybrid Connections summary view. + /// The Hybrid Connection V2 (Service Bus) view. + /// Kind of resource. + /// A new instance for mocking. + public static NetworkFeatureData NetworkFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string virtualNetworkName = null, AppServiceVirtualNetworkProperties virtualNetworkConnection = null, IEnumerable hybridConnections = null, IEnumerable hybridConnectionsV2 = null, string kind = null) + { + hybridConnections ??= new List(); + hybridConnectionsV2 ??= new List(); + + return new NetworkFeatureData(id, name, resourceType, systemData, virtualNetworkName, virtualNetworkConnection, hybridConnections?.ToList(), hybridConnectionsV2?.ToList(), kind); + } + + /// Initializes a new instance of WebAppNetworkTrace. + /// Local file path for the captured network trace file. + /// Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). + /// Detailed message of a network trace operation, e.g. error message in case of failure. + /// A new instance for mocking. + public static WebAppNetworkTrace WebAppNetworkTrace(string path = null, string status = null, string message = null) + { + return new WebAppNetworkTrace(path, status, message); + } + + /// Initializes a new instance of PerfMonResponseInfo. + /// The response code. + /// The message. + /// The performance monitor counters. + /// A new instance for mocking. + public static PerfMonResponseInfo PerfMonResponseInfo(string code = null, string message = null, PerfMonSet data = null) + { + return new PerfMonResponseInfo(code, message, data); + } + + /// Initializes a new instance of PerfMonSet. + /// Unique key name of the counter. + /// Start time of the period. + /// End time of the period. + /// Presented time grain. + /// Collection of workers that are active during this time. + /// A new instance for mocking. + public static PerfMonSet PerfMonSet(string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string timeGrain = null, IEnumerable values = null) + { + values ??= new List(); + + return new PerfMonSet(name, startOn, endOn, timeGrain, values?.ToList()); + } + + /// Initializes a new instance of PerfMonSample. + /// Point in time for which counter was measured. + /// Name of the server on which the measurement is made. + /// Value of counter at a certain time. + /// A new instance for mocking. + public static PerfMonSample PerfMonSample(DateTimeOffset? time = null, string instanceName = null, double? value = null) + { + return new PerfMonSample(time, instanceName, value); + } + + /// Initializes a new instance of SitePhpErrorLogFlag. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Local log_errors setting. + /// Master log_errors setting. + /// Local log_errors_max_len setting. + /// Master log_errors_max_len setting. + /// Kind of resource. + /// A new instance for mocking. + public static SitePhpErrorLogFlag SitePhpErrorLogFlag(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string localLogErrors = null, string masterLogErrors = null, string localLogErrorsMaxLength = null, string masterLogErrorsMaxLength = null, string kind = null) + { + return new SitePhpErrorLogFlag(id, name, resourceType, systemData, localLogErrors, masterLogErrors, localLogErrorsMaxLength, masterLogErrorsMaxLength, kind); + } + + /// Initializes a new instance of PremierAddOnData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Premier add on SKU. + /// Premier add on Product. + /// Premier add on Vendor. + /// Premier add on Marketplace publisher. + /// Premier add on Marketplace offer. + /// Kind of resource. + /// A new instance for mocking. + public static PremierAddOnData PremierAddOnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string sku = null, string product = null, string vendor = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) + { + tags ??= new Dictionary(); + + return new PremierAddOnData(id, name, resourceType, systemData, tags, location, sku, product, vendor, marketplacePublisher, marketplaceOffer, kind); + } + + /// Initializes a new instance of PremierAddOnPatchResource. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Premier add on SKU. + /// Premier add on Product. + /// Premier add on Vendor. + /// Premier add on Marketplace publisher. + /// Premier add on Marketplace offer. + /// Kind of resource. + /// A new instance for mocking. + public static PremierAddOnPatchResource PremierAddOnPatchResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sku = null, string product = null, string vendor = null, string marketplacePublisher = null, string marketplaceOffer = null, string kind = null) + { + return new PremierAddOnPatchResource(id, name, resourceType, systemData, sku, product, vendor, marketplacePublisher, marketplaceOffer, kind); + } + + /// Initializes a new instance of PrivateAccessData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Whether private access is enabled or not. + /// The Virtual Networks (and subnets) allowed to access the site privately. + /// Kind of resource. + /// A new instance for mocking. + public static PrivateAccessData PrivateAccessData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null, IEnumerable virtualNetworks = null, string kind = null) + { + virtualNetworks ??= new List(); + + return new PrivateAccessData(id, name, resourceType, systemData, isEnabled, virtualNetworks?.ToList(), kind); + } + + /// Initializes a new instance of PublicCertificateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Public Certificate byte array. + /// Public Certificate Location. + /// Certificate Thumbprint. + /// Kind of resource. + /// A new instance for mocking. + public static PublicCertificateData PublicCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, byte[] blob = null, PublicCertificateLocation? publicCertificateLocation = null, string thumbprintString = null, string kind = null) + { + return new PublicCertificateData(id, name, resourceType, systemData, blob, publicCertificateLocation, thumbprintString, kind); + } + + /// Initializes a new instance of DeletedAppRestoreContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// ARM resource ID of the deleted app. Example: + /// /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + /// + /// If true, deleted site configuration, in addition to content, will be restored. + /// + /// Point in time to restore the deleted app from, formatted as a DateTime string. + /// If unspecified, default value is the time that the app was deleted. + /// + /// If true, the snapshot is retrieved from DRSecondary endpoint. + /// Kind of resource. + /// A new instance for mocking. + public static DeletedAppRestoreContent DeletedAppRestoreContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier deletedSiteId = null, bool? recoverConfiguration = null, string snapshotTime = null, bool? useDRSecondary = null, string kind = null) + { + return new DeletedAppRestoreContent(id, name, resourceType, systemData, deletedSiteId, recoverConfiguration, snapshotTime, useDRSecondary, kind); + } + + /// Initializes a new instance of SnapshotRestoreRequest. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Point in time in which the app restore should be done, formatted as a DateTime string. + /// + /// Optional. Specifies the web app that snapshot contents will be retrieved from. + /// If empty, the targeted web app will be used as the source. + /// + /// If <code>true</code> the restore operation can overwrite source app; otherwise, <code>false</code>. + /// If true, site configuration, in addition to content, will be reverted. + /// + /// If true, custom hostname conflicts will be ignored when recovering to a target web app. + /// This setting is only necessary when RecoverConfiguration is enabled. + /// + /// If true, the snapshot is retrieved from DRSecondary endpoint. + /// Kind of resource. + /// A new instance for mocking. + public static SnapshotRestoreRequest SnapshotRestoreRequest(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string snapshotTime = null, SnapshotRecoverySource recoverySource = null, bool? canOverwrite = null, bool? recoverConfiguration = null, bool? ignoreConflictingHostNames = null, bool? useDRSecondary = null, string kind = null) + { + return new SnapshotRestoreRequest(id, name, resourceType, systemData, snapshotTime, recoverySource, canOverwrite, recoverConfiguration, ignoreConflictingHostNames, useDRSecondary, kind); + } + + /// Initializes a new instance of SiteExtensionInfoData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Site extension ID. + /// + /// Site extension type. + /// Summary description. + /// Detailed description. + /// Version information. + /// Extension URL. + /// Project URL. + /// Icon URL. + /// License URL. + /// Feed URL. + /// List of authors. + /// Installer command line parameters. + /// Published timestamp. + /// Count of downloads. + /// <code>true</code> if the local version is the latest version; <code>false</code> otherwise. + /// Local path. + /// Installed timestamp. + /// Provisioning state. + /// Site Extension comment. + /// Kind of resource. + /// A new instance for mocking. + public static SiteExtensionInfoData SiteExtensionInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string extensionId = null, string title = null, SiteExtensionType? extensionType = null, string summary = null, string description = null, string version = null, Uri extensionUri = null, Uri projectUri = null, Uri iconUri = null, Uri licenseUri = null, Uri feedUri = null, IEnumerable authors = null, string installerCommandLineParams = null, DateTimeOffset? publishedOn = null, int? downloadCount = null, bool? localIsLatestVersion = null, string localPath = null, DateTimeOffset? installedOn = null, string provisioningState = null, string comment = null, string kind = null) + { + authors ??= new List(); + + return new SiteExtensionInfoData(id, name, resourceType, systemData, extensionId, title, extensionType, summary, description, version, extensionUri, projectUri, iconUri, licenseUri, feedUri, authors?.ToList(), installerCommandLineParams, publishedOn, downloadCount, localIsLatestVersion, localPath, installedOn, provisioningState, comment, kind); + } + + /// Initializes a new instance of SlotDifference. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Level of the difference: Information, Warning or Error. + /// The type of the setting: General, AppSetting or ConnectionString. + /// Rule that describes how to process the setting difference during a slot swap. + /// Name of the setting. + /// Value of the setting in the current slot. + /// Value of the setting in the target slot. + /// Description of the setting difference. + /// Kind of resource. + /// A new instance for mocking. + public static SlotDifference SlotDifference(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string level = null, string settingType = null, string diffRule = null, string settingName = null, string valueInCurrentSlot = null, string valueInTargetSlot = null, string description = null, string kind = null) + { + return new SlotDifference(id, name, resourceType, systemData, level, settingType, diffRule, settingName, valueInCurrentSlot, valueInTargetSlot, description, kind); + } + + /// Initializes a new instance of SiteSourceControlData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Repository or source control URL. + /// Name of branch to use for deployment. + /// <code>true</code> to limit to manual integration; <code>false</code> to enable continuous integration (which configures webhooks into online repos like GitHub). + /// <code>true</code> if this is deployed via GitHub action. + /// <code>true</code> to enable deployment rollback; otherwise, <code>false</code>. + /// <code>true</code> for a Mercurial repository; <code>false</code> for a Git repository. + /// If GitHub Action is selected, than the associated configuration. + /// Kind of resource. + /// A new instance for mocking. + public static SiteSourceControlData SiteSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repoUri = null, string branch = null, bool? isManualIntegration = null, bool? isGitHubAction = null, bool? isDeploymentRollbackEnabled = null, bool? isMercurial = null, GitHubActionConfiguration gitHubActionConfiguration = null, string kind = null) + { + return new SiteSourceControlData(id, name, resourceType, systemData, repoUri, branch, isManualIntegration, isGitHubAction, isDeploymentRollbackEnabled, isMercurial, gitHubActionConfiguration, kind); + } + + /// Initializes a new instance of TriggeredWebJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Latest job run information. + /// History URL. + /// Scheduler Logs URL. + /// Run command. + /// Job URL. + /// Extra Info URL. + /// Job type. + /// Error information. + /// Using SDK?. + /// Job settings. + /// Kind of resource. + /// A new instance for mocking. + public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) + { + settings ??= new Dictionary(); + + return new TriggeredWebJobData(id, name, resourceType, systemData, latestRun, historyUri, schedulerLogsUri, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); + } + + /// Initializes a new instance of TriggeredJobHistoryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of triggered web job runs. + /// Kind of resource. + /// A new instance for mocking. + public static TriggeredJobHistoryData TriggeredJobHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable runs = null, string kind = null) + { + runs ??= new List(); + + return new TriggeredJobHistoryData(id, name, resourceType, systemData, runs?.ToList(), kind); + } + + /// Initializes a new instance of WebJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Run command. + /// Job URL. + /// Extra Info URL. + /// Job type. + /// Error information. + /// Using SDK?. + /// Job settings. + /// Kind of resource. + /// A new instance for mocking. + public static WebJobData WebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) + { + settings ??= new Dictionary(); + + return new WebJobData(id, name, resourceType, systemData, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs index c0ea55bdfb21..ffcc2b1480c1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs @@ -50,7 +50,7 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// /// /// Kind of resource. - internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Resources.Models.ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind) : base(id, name, resourceType, systemData, tags, location) + internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; ProvisioningState = provisioningState; @@ -65,7 +65,7 @@ internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType re } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Provisioning state of the Kubernetes Environment. public KubeEnvironmentProvisioningState? ProvisioningState { get; } /// Any errors that occurred during deployment or deployment validation. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs index 195608493c9b..20901f2b9083 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs @@ -89,7 +89,7 @@ internal static ApiKeyVaultReferenceData DeserializeApiKeyVaultReferenceData(Jso Optional vaultName = default; Optional secretName = default; Optional secretVersion = default; - Optional identityType = default; + Optional identityType = default; Optional details = default; Optional source = default; Optional activeVersion = default; @@ -168,7 +168,7 @@ internal static ApiKeyVaultReferenceData DeserializeApiKeyVaultReferenceData(Jso { continue; } - identityType = JsonSerializer.Deserialize(property0.Value.GetRawText()); + identityType = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } if (property0.NameEquals("details"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs index 1d17bcc10789..ca07066cd9c1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs @@ -164,7 +164,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele return null; } Optional sku = default; - Optional extendedLocation = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -211,7 +211,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs index 46b04d578904..433339638f41 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs @@ -79,7 +79,7 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e { return null; } - Optional extendedLocation = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -103,7 +103,7 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs index 10b4fc835bbc..36639431eaa9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs @@ -28,7 +28,7 @@ internal static ResponseMessageEnvelopeRemotePrivateEndpointConnection Deseriali Optional sku = default; Optional status = default; Optional error = default; - Optional identity = default; + Optional identity = default; Optional> zones = default; ResourceIdentifier id = default; string name = default; @@ -106,7 +106,7 @@ internal static ResponseMessageEnvelopeRemotePrivateEndpointConnection Deseriali { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("zones"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs index 0f73c24e5a45..e4bec42d0545 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -36,7 +36,7 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection() /// Azure-AsyncOperation Error info. /// MSI resource. /// Logical Availability Zones the service is hosted in. - internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, AppServiceArmPlan plan, RemotePrivateEndpointConnection properties, AppServiceSkuDescription sku, string status, ResponseError error, ResourceManager.Models.ManagedServiceIdentity identity, IReadOnlyList zones) : base(id, name, resourceType, systemData) + internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, AppServiceArmPlan plan, RemotePrivateEndpointConnection properties, AppServiceSkuDescription sku, string status, ResponseError error, ManagedServiceIdentity identity, IReadOnlyList zones) : base(id, name, resourceType, systemData) { Location = location; Tags = tags; @@ -64,7 +64,7 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifi /// Azure-AsyncOperation Error info. public ResponseError Error { get; } /// MSI resource. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; } + public ManagedServiceIdentity Identity { get; } /// Logical Availability Zones the service is hosted in. public IReadOnlyList Zones { get; } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs index 26be8b878bc8..ae2a71a17ea1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs @@ -160,7 +160,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element) { return null; } - Optional identity = default; + Optional identity = default; Optional kind = default; ResourceIdentifier id = default; string name = default; @@ -215,7 +215,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs index eeac0b2c8e45..aa2e0732cbf5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs @@ -92,7 +92,7 @@ public SitePatchInfo() /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// /// Kind of resource. - internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceManager.Models.ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData) + internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData) { Identity = identity; State = state; @@ -140,7 +140,7 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Current state of the app. public string State { get; } /// Hostnames associated with the app. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs index 6126a1d6ace4..f9299c0b11cc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs @@ -95,7 +95,7 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element) return null; } Optional sku = default; - Optional identity = default; + Optional identity = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -134,7 +134,7 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs index 51a770ae2fe4..b1c9aa74be6e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs @@ -194,8 +194,8 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { return null; } - Optional identity = default; - Optional extendedLocation = default; + Optional identity = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -252,7 +252,7 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("extendedLocation"u8)) @@ -261,7 +261,7 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs index 7c9d24cba3c2..17b7d3f59ad5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs @@ -52,7 +52,7 @@ public StaticSiteData(AzureLocation location) : base(location) /// User provided function apps registered with the static site. /// The provider that submitted the last deployment to the primary environment of the static site. /// Kind of resource. - internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ResourceManager.Models.ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind) : base(id, name, resourceType, systemData, tags, location) + internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -76,7 +76,7 @@ internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourc /// Description of a SKU for a scalable resource. public AppServiceSkuDescription Sku { get; set; } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// The default autogenerated hostname for the static site. public string DefaultHostname { get; } /// URL for the repository of the static site. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs index 02edbbd68acc..3617a21a32e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs @@ -101,7 +101,7 @@ public WebSiteData(AzureLocation location) : base(location) /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// /// Kind of resource. - internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceManager.Models.ManagedServiceIdentity identity, Resources.Models.ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData, tags, location) + internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ExtendedLocation = extendedLocation; @@ -150,9 +150,9 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Current state of the app. public string State { get; } /// Hostnames associated with the app. From 8f7dc75b7654ec447e261fa866d9a2736992cb90 Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 13:14:09 -0700 Subject: [PATCH 3/6] update resources to follow hack pattern --- ...ResourceManager.KeyVault.netstandard2.0.cs | 54 ++++++++++-- ...esourceManager.Resources.netstandard2.0.cs | 18 +++- ...eploymentScriptData.Bicep.Serialization.cs | 60 +++++++++++++ .../AzureCliScript.Bicep.Serialization.cs | 84 +++++++++++++++++++ ...EnvironmentVariable.Bicep.Serialization.cs | 56 +++++++++++++ .../{ => CdkHack}/StringBuilderExtensions.cs | 0 .../ArmDeploymentScriptData.Serialization.cs | 52 +----------- .../Models/AzureCliScript.Serialization.cs | 76 +---------------- ...ScriptEnvironmentVariable.Serialization.cs | 51 +---------- 9 files changed, 269 insertions(+), 182 deletions(-) create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs rename sdk/resources/Azure.ResourceManager.Resources/src/{ => CdkHack}/StringBuilderExtensions.cs (100%) diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs index e284e03b0cfe..0552efeba2a2 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs @@ -65,10 +65,14 @@ protected KeyVaultCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class KeyVaultData : Azure.ResourceManager.Models.TrackedResourceData + public partial class KeyVaultData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultData(Azure.Core.AzureLocation location, Azure.ResourceManager.KeyVault.Models.KeyVaultProperties properties) : base (default(Azure.Core.AzureLocation)) { } public Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.KeyVaultData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.KeyVaultData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public static partial class KeyVaultExtensions { @@ -206,12 +210,16 @@ protected KeyVaultSecretCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class KeyVaultSecretData : Azure.ResourceManager.Models.ResourceData + public partial class KeyVaultSecretData : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultSecretData(Azure.ResourceManager.KeyVault.Models.SecretProperties properties) { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.KeyVault.Models.SecretProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + Azure.ResourceManager.KeyVault.KeyVaultSecretData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.KeyVaultSecretData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class KeyVaultSecretResource : Azure.ResourceManager.ArmResource { @@ -448,13 +456,17 @@ internal DeletedManagedHsmProperties() { } public static bool operator !=(Azure.ResourceManager.KeyVault.Models.IdentityAccessKeyPermission left, Azure.ResourceManager.KeyVault.Models.IdentityAccessKeyPermission right) { throw null; } public override string ToString() { throw null; } } - public partial class IdentityAccessPermissions + public partial class IdentityAccessPermissions : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public IdentityAccessPermissions() { } public System.Collections.Generic.IList Certificates { get { throw null; } } public System.Collections.Generic.IList Keys { get { throw null; } } public System.Collections.Generic.IList Secrets { get { throw null; } } public System.Collections.Generic.IList Storage { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct IdentityAccessSecretPermission : System.IEquatable @@ -512,24 +524,36 @@ public IdentityAccessPermissions() { } public static bool operator !=(Azure.ResourceManager.KeyVault.Models.IdentityAccessStoragePermission left, Azure.ResourceManager.KeyVault.Models.IdentityAccessStoragePermission right) { throw null; } public override string ToString() { throw null; } } - public partial class KeyVaultAccessPolicy + public partial class KeyVaultAccessPolicy : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicy(System.Guid tenantId, string objectId, Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions permissions) { } public System.Guid? ApplicationId { get { throw null; } set { } } public string ObjectId { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Permissions { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicy Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicy Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } - public partial class KeyVaultAccessPolicyParameters : Azure.ResourceManager.Models.ResourceData + public partial class KeyVaultAccessPolicyParameters : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicyParameters(Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties properties) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyParameters Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyParameters Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } - public partial class KeyVaultAccessPolicyProperties + public partial class KeyVaultAccessPolicyProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicyProperties(System.Collections.Generic.IEnumerable accessPolicies) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultActionsRequiredMessage : System.IEquatable @@ -722,7 +746,7 @@ public KeyVaultPrivateLinkServiceConnectionState() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.KeyVaultPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } } - public partial class KeyVaultProperties + public partial class KeyVaultProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultProperties(System.Guid tenantId, Azure.ResourceManager.KeyVault.Models.KeyVaultSku sku) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } } @@ -742,6 +766,10 @@ public KeyVaultProperties(System.Guid tenantId, Azure.ResourceManager.KeyVault.M public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } public System.Uri VaultUri { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultProvisioningState : System.IEquatable @@ -773,11 +801,15 @@ public KeyVaultSecretPatch() { } public Azure.ResourceManager.KeyVault.Models.SecretPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class KeyVaultSku + public partial class KeyVaultSku : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultSku(Azure.ResourceManager.KeyVault.Models.KeyVaultSkuFamily family, Azure.ResourceManager.KeyVault.Models.KeyVaultSkuName name) { } public Azure.ResourceManager.KeyVault.Models.KeyVaultSkuFamily Family { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.KeyVaultSkuName Name { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultSku Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultSku Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultSkuFamily : System.IEquatable @@ -1144,7 +1176,7 @@ public SecretPatchProperties() { } public string ContentType { get { throw null; } set { } } public string Value { get { throw null; } set { } } } - public partial class SecretProperties + public partial class SecretProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SecretProperties() { } public Azure.ResourceManager.KeyVault.Models.SecretAttributes Attributes { get { throw null; } set { } } @@ -1152,5 +1184,9 @@ public SecretProperties() { } public System.Uri SecretUri { get { throw null; } } public string SecretUriWithVersion { get { throw null; } } public string Value { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.SecretProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.SecretProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs index b3f4c9408e27..0587e513e964 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs @@ -186,12 +186,16 @@ protected ArmDeploymentScriptCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ArmDeploymentScriptData : Azure.ResourceManager.Models.ResourceData + public partial class ArmDeploymentScriptData : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ArmDeploymentScriptData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Resources.Models.ArmDeploymentScriptManagedIdentity Identity { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + Azure.ResourceManager.Resources.ArmDeploymentScriptData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.ArmDeploymentScriptData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class ArmDeploymentScriptResource : Azure.ResourceManager.ArmResource { @@ -819,7 +823,7 @@ public static partial class ArmResourcesModelFactory public static Azure.ResourceManager.Resources.Models.WhatIfOperationResult WhatIfOperationResult(string status = null, Azure.ResponseError error = null, System.Collections.Generic.IEnumerable changes = null) { throw null; } public static Azure.ResourceManager.Resources.Models.WhatIfPropertyChange WhatIfPropertyChange(string path = null, Azure.ResourceManager.Resources.Models.WhatIfPropertyChangeType propertyChangeType = Azure.ResourceManager.Resources.Models.WhatIfPropertyChangeType.Create, System.BinaryData before = null, System.BinaryData after = null, System.Collections.Generic.IEnumerable children = null) { throw null; } } - public partial class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData + public partial class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public AzureCliScript(Azure.Core.AzureLocation location, System.TimeSpan retentionInterval, string azCliVersion) : base (default(Azure.Core.AzureLocation)) { } public string Arguments { get { throw null; } set { } } @@ -837,6 +841,10 @@ public AzureCliScript(Azure.Core.AzureLocation location, System.TimeSpan retenti public Azure.ResourceManager.Resources.Models.ScriptStorageConfiguration StorageAccountSettings { get { throw null; } set { } } public System.Collections.Generic.IList SupportingScriptUris { get { throw null; } } public System.TimeSpan? Timeout { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.AzureCliScript Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.Models.AzureCliScript Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class AzurePowerShellScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData { @@ -1072,12 +1080,16 @@ public enum ProvisioningOperationKind public static bool operator !=(Azure.ResourceManager.Resources.Models.ScriptCleanupOptions left, Azure.ResourceManager.Resources.Models.ScriptCleanupOptions right) { throw null; } public override string ToString() { throw null; } } - public partial class ScriptEnvironmentVariable + public partial class ScriptEnvironmentVariable : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ScriptEnvironmentVariable(string name) { } public string Name { get { throw null; } set { } } public string SecureValue { get { throw null; } set { } } public string Value { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.ScriptEnvironmentVariable Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.Models.ScriptEnvironmentVariable Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ScriptProvisioningState : System.IEquatable diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs new file mode 100644 index 000000000000..71120ff85ad7 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + public partial class ArmDeploymentScriptData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ArmDeploymentScriptData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeArmDeploymentScriptData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ArmDeploymentScriptData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeArmDeploymentScriptData(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + sb.AppendLine($" kind: '{Kind}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs new file mode 100644 index 000000000000..2817d11f5e16 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Text.Json; +using System.Xml; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class AzureCliScript : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + AzureCliScript IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureCliScript(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + AzureCliScript IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeAzureCliScript(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + sb.AppendLine($" kind: '{Kind}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + sb.AppendLine($" properties: {{"); + sb.AppendLine($" azCliVersion: '{AzCliVersion}'"); + sb.AppendLine($" retentionInterval: '{XmlConvert.ToString(RetentionInterval)}'"); + if (Timeout.HasValue) + { + sb.AppendLine($" timeout: '{XmlConvert.ToString(Timeout.Value)}'"); + } + sb.AppendLine($" cleanupPreference: '{CleanupPreference}'"); + if (Optional.IsCollectionDefined(EnvironmentVariables) && EnvironmentVariables.Count > 0) + { + sb.AppendLine($" environmentVariables: ["); + foreach (var variable in EnvironmentVariables) + { + sb.AppendLine($" {{"); + sb.AppendChildObject(variable, options, true, 6); + sb.AppendLine($" }}"); + } + sb.AppendLine($" ]"); + } + sb.AppendLine($" scriptContent: '''"); + sb.AppendLine($"{ScriptContent}"); + sb.AppendLine($" '''"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs new file mode 100644 index 000000000000..45928a0e6c3e --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ScriptEnvironmentVariable : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ScriptEnvironmentVariable IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeScriptEnvironmentVariable(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ScriptEnvironmentVariable IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeScriptEnvironmentVariable(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + if (Optional.IsDefined(Value)) + { + string value = Value.StartsWith("_p_.", StringComparison.Ordinal) ? Value.Substring(4) : $"'{Value}'"; + sb.AppendLine($" value: {value}"); + } + if (Optional.IsDefined(SecureValue)) + { + string value = SecureValue.StartsWith("_p_.", StringComparison.Ordinal) ? SecureValue.Substring(4) : $"'{SecureValue}'"; + sb.AppendLine($" secureValue: {value}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/StringBuilderExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/StringBuilderExtensions.cs similarity index 100% rename from sdk/resources/Azure.ResourceManager.Resources/src/StringBuilderExtensions.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/StringBuilderExtensions.cs diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs index 83cd313e5697..1e72f180d7e4 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs @@ -5,22 +5,17 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Resources { - public partial class ArmDeploymentScriptData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ArmDeploymentScriptData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -46,10 +41,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonElement element, ModelSerializerOptions options = default) + internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -132,44 +125,5 @@ internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonE } return new ArmDeploymentScriptData(id, name, type, systemData.Value, identity.Value, location, Optional.ToDictionary(tags), kind); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ArmDeploymentScriptData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeArmDeploymentScriptData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ArmDeploymentScriptData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeArmDeploymentScriptData(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - sb.AppendLine($" kind: '{Kind}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs index c07d0bac5e42..d4db631632bf 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs @@ -7,21 +7,15 @@ using System; using System.Collections.Generic; -using System.Globalization; -using System.Text; using System.Text.Json; -using System.Xml; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Resources.Models { - public partial class AzureCliScript : IUtf8JsonSerializable, IModelJsonSerializable + public partial class AzureCliScript : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -119,10 +113,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static AzureCliScript DeserializeAzureCliScript(JsonElement element, ModelSerializerOptions options = default) + internal static AzureCliScript DeserializeAzureCliScript(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -356,67 +348,5 @@ internal static AzureCliScript DeserializeAzureCliScript(JsonElement element, Mo } return new AzureCliScript(id, name, type, systemData.Value, identity.Value, location, Optional.ToDictionary(tags), kind, containerSettings.Value, storageAccountSettings.Value, Optional.ToNullable(cleanupPreference), Optional.ToNullable(provisioningState), status.Value, outputs.Value, primaryScriptUri.Value, Optional.ToList(supportingScriptUris), scriptContent.Value, arguments.Value, Optional.ToList(environmentVariables), forceUpdateTag.Value, retentionInterval, Optional.ToNullable(timeout), azCliVersion); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - AzureCliScript IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureCliScript(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - AzureCliScript IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeAzureCliScript(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - sb.AppendLine($" kind: '{Kind}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - sb.AppendLine($" properties: {{"); - sb.AppendLine($" azCliVersion: '{AzCliVersion}'"); - sb.AppendLine($" retentionInterval: '{XmlConvert.ToString(RetentionInterval)}'"); - if (Timeout.HasValue) - { - sb.AppendLine($" timeout: '{XmlConvert.ToString(Timeout.Value)}'"); - } - sb.AppendLine($" cleanupPreference: '{CleanupPreference}'"); - if (Optional.IsCollectionDefined(EnvironmentVariables) && EnvironmentVariables.Count > 0) - { - sb.AppendLine($" environmentVariables: ["); - foreach (var variable in EnvironmentVariables) - { - sb.AppendLine($" {{"); - sb.AppendChildObject(variable, options, true, 6); - sb.AppendLine($" }}"); - } - sb.AppendLine($" ]"); - } - sb.AppendLine($" scriptContent: '''"); - sb.AppendLine($"{ScriptContent}"); - sb.AppendLine($" '''"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs index 4f4da05c7945..557b97218d87 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs @@ -5,19 +5,14 @@ #nullable disable -using System; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; namespace Azure.ResourceManager.Resources.Models { - public partial class ScriptEnvironmentVariable : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ScriptEnvironmentVariable : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); @@ -35,10 +30,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(JsonElement element, ModelSerializerOptions options = default) + internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -66,43 +59,5 @@ internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(J } return new ScriptEnvironmentVariable(name, value.Value, secureValue.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ScriptEnvironmentVariable IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeScriptEnvironmentVariable(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ScriptEnvironmentVariable IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeScriptEnvironmentVariable(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - if (Optional.IsDefined(Value)) - { - string value = Value.StartsWith("_p_.", StringComparison.Ordinal) ? Value.Substring(4) : $"'{Value}'"; - sb.AppendLine($" value: {value}"); - } - if (Optional.IsDefined(SecureValue)) - { - string value = SecureValue.StartsWith("_p_.", StringComparison.Ordinal) ? SecureValue.Substring(4) : $"'{SecureValue}'"; - sb.AppendLine($" secureValue: {value}"); - } - return BinaryData.FromString(sb.ToString()); - } } } From 47013b6bd3b696ae6fe7d89419ded6af1d481d2f Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 13:22:44 -0700 Subject: [PATCH 4/6] update sqlmanagement --- ...zure.ResourceManager.Sql.netstandard2.0.cs | 18 +++++- .../Models/SqlDatabaseData.Serialization.cs | 50 +---------------- .../SqlFirewallRuleData.Serialization.cs | 45 +-------------- .../Models/SqlServerData.Serialization.cs | 56 +------------------ 4 files changed, 24 insertions(+), 145 deletions(-) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs index a1e1fa3cc57d..510dcb12aef2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs @@ -2698,7 +2698,7 @@ protected SqlDatabaseColumnResource() { } public virtual System.Threading.Tasks.Task> GetSqlDatabaseSensitivityLabelAsync(Azure.ResourceManager.Sql.Models.SensitivityLabelSource sensitivityLabelSource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Sql.SqlDatabaseSensitivityLabelCollection GetSqlDatabaseSensitivityLabels() { throw null; } } - public partial class SqlDatabaseData : Azure.ResourceManager.Models.TrackedResourceData + public partial class SqlDatabaseData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public int? AutoPauseDelay { get { throw null; } set { } } @@ -2750,6 +2750,10 @@ public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure. public Azure.Core.ResourceIdentifier SourceDatabaseId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? Status { get { throw null; } } + Azure.ResourceManager.Sql.SqlDatabaseData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlDatabaseData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlDatabaseResource : Azure.ResourceManager.ArmResource { @@ -3466,11 +3470,15 @@ protected SqlFirewallRuleCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlFirewallRuleData : Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName + public partial class SqlFirewallRuleData : Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlFirewallRuleData() { } public string EndIPAddress { get { throw null; } set { } } public string StartIPAddress { get { throw null; } set { } } + Azure.ResourceManager.Sql.SqlFirewallRuleData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlFirewallRuleData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlFirewallRuleResource : Azure.ResourceManager.ArmResource { @@ -3794,7 +3802,7 @@ protected SqlServerConnectionPolicyResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlServerConnectionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlServerConnectionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SqlServerData : Azure.ResourceManager.Models.TrackedResourceData + public partial class SqlServerData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public string AdministratorLogin { get { throw null; } set { } } @@ -3814,6 +3822,10 @@ public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Co public string State { get { throw null; } } public string Version { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? WorkspaceFeature { get { throw null; } } + Azure.ResourceManager.Sql.SqlServerData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlServerData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlServerDatabaseReplicationLinkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs index 77738ce95a73..b6481b91f422 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs @@ -7,20 +7,16 @@ using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { - public partial class SqlDatabaseData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlDatabaseData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Sku)) @@ -213,10 +209,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -758,43 +752,5 @@ internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element, } return new SqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, managedBy.Value, identity.Value, Optional.ToNullable(createMode), collation.Value, Optional.ToNullable(maxSizeBytes), Optional.ToNullable(sampleName), elasticPoolId.Value, sourceDatabaseId.Value, Optional.ToNullable(status), Optional.ToNullable(databaseId), Optional.ToNullable(creationDate), currentServiceObjectiveName.Value, requestedServiceObjectiveName.Value, Optional.ToNullable(defaultSecondaryLocation), failoverGroupId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(sourceDatabaseDeletionDate), recoveryServicesRecoveryPointId.Value, longTermRetentionBackupResourceId.Value, recoverableDatabaseId.Value, restorableDroppedDatabaseId.Value, Optional.ToNullable(catalogCollation), Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), Optional.ToNullable(maxLogSizeBytes), Optional.ToNullable(earliestRestoreDate), Optional.ToNullable(readScale), Optional.ToNullable(highAvailabilityReplicaCount), Optional.ToNullable(secondaryType), currentSku.Value, Optional.ToNullable(autoPauseDelay), Optional.ToNullable(currentBackupStorageRedundancy), Optional.ToNullable(requestedBackupStorageRedundancy), Optional.ToNullable(minCapacity), Optional.ToNullable(pausedDate), Optional.ToNullable(resumedDate), maintenanceConfigurationId.Value, Optional.ToNullable(isLedgerOn), Optional.ToNullable(isInfraEncryptionEnabled), Optional.ToNullable(federatedClientId), Optional.ToDictionary(keys), encryptionProtector.Value, Optional.ToNullable(preferredEnclaveType), sourceResourceId.Value, Optional.ToNullable(manualCutover), Optional.ToNullable(performCutover), Optional.ToNullable(availabilityZone)); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlDatabaseData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlDatabaseData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlDatabaseData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlDatabaseData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs index 3337bf331c34..a74eff21a035 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs @@ -5,19 +5,14 @@ #nullable disable -using System; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; namespace Azure.ResourceManager.Sql { - public partial class SqlFirewallRuleData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlFirewallRuleData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Name)) @@ -41,10 +36,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -104,37 +97,5 @@ internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement e } return new SqlFirewallRuleData(id.Value, name.Value, Optional.ToNullable(type), startIPAddress.Value, endIPAddress.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlFirewallRuleData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlFirewallRuleData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlFirewallRuleData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlFirewallRuleData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" properties: {{"); - sb.AppendLine($" startIpAddress: '{StartIPAddress}'"); - sb.AppendLine($" endIpAddress: '{EndIPAddress}'"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs index efb2bc607dbb..61b95ef6e807 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs @@ -7,20 +7,16 @@ using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { - public partial class SqlServerData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlServerData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -98,10 +94,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlServerData DeserializeSqlServerData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlServerData DeserializeSqlServerData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -320,49 +314,5 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element, Mode } return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(externalGovernanceStatus)); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlServerData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlServerData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlServerData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlServerData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - sb.AppendLine($" properties: {{"); - sb.AppendLine($" administratorLogin: '{AdministratorLogin}'"); - sb.AppendLine($" administratorLoginPassword: '{AdministratorLoginPassword}'"); - sb.AppendLine($" version: '{Version}'"); - sb.AppendLine($" minimalTlsVersion: '{MinimalTlsVersion}'"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } From de2f5d026dee10dbe7cb5192d6c060d1008ef1f5 Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 13:22:59 -0700 Subject: [PATCH 5/6] add missing files --- .../SqlDatabaseData.Bicep.Serialization.cs | 59 +++++++++++++++++ ...SqlFirewallRuleData.Bicep.Serialization.cs | 50 ++++++++++++++ .../SqlServerData.Bicep.Serialization.cs | 65 +++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs new file mode 100644 index 000000000000..6ad3b1a524de --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlDatabaseData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlDatabaseData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlDatabaseData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlDatabaseData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlDatabaseData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs new file mode 100644 index 000000000000..69f89d60239c --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlFirewallRuleData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlFirewallRuleData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlFirewallRuleData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlFirewallRuleData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlFirewallRuleData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" properties: {{"); + sb.AppendLine($" startIpAddress: '{StartIPAddress}'"); + sb.AppendLine($" endIpAddress: '{EndIPAddress}'"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs new file mode 100644 index 000000000000..69684e8908b5 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlServerData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlServerData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlServerData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlServerData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlServerData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + sb.AppendLine($" properties: {{"); + sb.AppendLine($" administratorLogin: '{AdministratorLogin}'"); + sb.AppendLine($" administratorLoginPassword: '{AdministratorLoginPassword}'"); + sb.AppendLine($" version: '{Version}'"); + sb.AppendLine($" minimalTlsVersion: '{MinimalTlsVersion}'"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} From 4a997d8f3bac3d9fb98310aecb234decc32c8e65 Mon Sep 17 00:00:00 2001 From: m-nash Date: Thu, 14 Sep 2023 13:26:11 -0700 Subject: [PATCH 6/6] update resourcemanager --- .../Azure.ResourceManager.netstandard2.0.cs | 6 +- .../ResourceGroupData.Bicep.Serialization.cs | 63 +++++++++++++++++++ .../Models/ResourceGroupData.Serialization.cs | 55 +--------------- 3 files changed, 71 insertions(+), 53 deletions(-) create mode 100644 sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs index f7132161f880..f515d815be55 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs @@ -860,11 +860,15 @@ protected ResourceGroupCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ResourceGroupData : Azure.ResourceManager.Models.TrackedResourceData + public partial class ResourceGroupData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ResourceGroupData(Azure.Core.AzureLocation location) { } public string ManagedBy { get { throw null; } set { } } public string ResourceGroupProvisioningState { get { throw null; } } + Azure.ResourceManager.Resources.ResourceGroupData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.ResourceGroupData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class ResourceGroupResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs new file mode 100644 index 000000000000..0ed0611c4d40 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + public partial class ResourceGroupData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ResourceGroupData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceGroupData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ResourceGroupData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeResourceGroupData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if(Optional.IsDefined(ManagedBy)) + { + sb.AppendLine($" managedBy: {ManagedBy}"); + } + if(Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach(var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs index d2878621906c..722f0d775caa 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs @@ -5,22 +5,17 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Resources { - public partial class ResourceGroupData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ResourceGroupData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Properties)) @@ -49,10 +44,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ResourceGroupData DeserializeResourceGroupData(JsonElement element, ModelSerializerOptions options = default) + internal static ResourceGroupData DeserializeResourceGroupData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -127,47 +120,5 @@ internal static ResourceGroupData DeserializeResourceGroupData(JsonElement eleme } return new ResourceGroupData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value, managedBy.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ResourceGroupData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeResourceGroupData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ResourceGroupData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeResourceGroupData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if(Optional.IsDefined(ManagedBy)) - { - sb.AppendLine($" managedBy: {ManagedBy}"); - } - if(Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach(var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } }