|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +#nullable disable |
| 5 | + |
| 6 | +using System; |
| 7 | +using System.Collections.Generic; |
| 8 | +using System.ComponentModel; |
| 9 | +using System.Linq; |
| 10 | +using Azure.Core; |
| 11 | + |
| 12 | +namespace Azure.ResourceManager.ProviderHub.Models |
| 13 | +{ |
| 14 | + /// <summary> Model factory for models. </summary> |
| 15 | + public static partial class ArmProviderHubModelFactory |
| 16 | + { |
| 17 | + /// <summary> Initializes a new instance of <see cref="Models.CheckinManifestInfo"/>. </summary> |
| 18 | + /// <param name="isCheckedIn"></param> |
| 19 | + /// <param name="statusMessage"></param> |
| 20 | + /// <param name="pullRequest"></param> |
| 21 | + /// <param name="commitId"></param> |
| 22 | + /// <returns> A new <see cref="Models.CheckinManifestInfo"/> instance for mocking. </returns> |
| 23 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 24 | + public static CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = default, string statusMessage = null, string pullRequest = null, string commitId = null) |
| 25 | + => new CheckinManifestInfo(isCheckedIn, statusMessage, pullRequest, commitId, null); |
| 26 | + |
| 27 | + /// <summary> Initializes a new instance of <see cref="Models.LinkedOperationRule"/>. </summary> |
| 28 | + /// <param name="linkedOperation"></param> |
| 29 | + /// <param name="linkedAction"></param> |
| 30 | + /// <returns> A new <see cref="Models.LinkedOperationRule"/> instance for mocking. </returns> |
| 31 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 32 | + public static LinkedOperationRule LinkedOperationRule(LinkedOperation linkedOperation = default, LinkedAction linkedAction = default) |
| 33 | + => new LinkedOperationRule(linkedOperation, linkedAction, new ChangeTrackingList<string>(), null); |
| 34 | + |
| 35 | + /// <summary> Initializes a new instance of <see cref="Models.ProviderResourceType"/>. </summary> |
| 36 | + /// <param name="name"></param> |
| 37 | + /// <param name="routingType"></param> |
| 38 | + /// <param name="resourceValidation"></param> |
| 39 | + /// <param name="allowedUnauthorizedActions"></param> |
| 40 | + /// <param name="authorizationActionMappings"></param> |
| 41 | + /// <param name="linkedAccessChecks"></param> |
| 42 | + /// <param name="defaultApiVersion"></param> |
| 43 | + /// <param name="loggingRules"></param> |
| 44 | + /// <param name="throttlingRules"></param> |
| 45 | + /// <param name="endpoints"></param> |
| 46 | + /// <param name="marketplaceType"></param> |
| 47 | + /// <param name="managementType"></param> |
| 48 | + /// <param name="metadata"> Anything. </param> |
| 49 | + /// <param name="requiredFeatures"></param> |
| 50 | + /// <param name="requiredFeaturesPolicy"></param> |
| 51 | + /// <param name="subscriptionStateRules"></param> |
| 52 | + /// <param name="serviceTreeInfos"></param> |
| 53 | + /// <param name="optInHeaders"></param> |
| 54 | + /// <param name="skuLink"></param> |
| 55 | + /// <param name="disallowedActionVerbs"></param> |
| 56 | + /// <param name="templateDeploymentPolicy"></param> |
| 57 | + /// <param name="extendedLocations"></param> |
| 58 | + /// <param name="linkedOperationRules"></param> |
| 59 | + /// <param name="resourceDeletionPolicy"></param> |
| 60 | + /// <returns> A new <see cref="Models.ProviderResourceType"/> instance for mocking. </returns> |
| 61 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 62 | + public static ProviderResourceType ProviderResourceType(string name = null, ResourceRoutingType? routingType = null, ResourceValidation? resourceValidation = null, IEnumerable<string> allowedUnauthorizedActions = null, IEnumerable<AuthorizationActionMapping> authorizationActionMappings = null, IEnumerable<LinkedAccessCheck> linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable<LoggingRule> loggingRules = null, IEnumerable<ThrottlingRule> throttlingRules = null, IEnumerable<ResourceProviderEndpoint> endpoints = null, MarketplaceType? marketplaceType = null, IdentityManagementType? managementType = null, BinaryData metadata = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, IEnumerable<ProviderSubscriptionStateRule> subscriptionStateRules = null, IEnumerable<ServiceTreeInfo> serviceTreeInfos = null, OptInHeaderType? optInHeaders = null, string skuLink = null, IEnumerable<string> disallowedActionVerbs = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, IEnumerable<ProviderHubExtendedLocationOptions> extendedLocations = null, IEnumerable<LinkedOperationRule> linkedOperationRules = null, ManifestResourceDeletionPolicy? resourceDeletionPolicy = null) |
| 63 | + => new ProviderResourceType(name, routingType, null, null, resourceValidation, allowedUnauthorizedActions.ToList(), null, authorizationActionMappings.ToList(), linkedAccessChecks.ToList(), defaultApiVersion, loggingRules.ToList(), throttlingRules.ToList(), endpoints.ToList(), marketplaceType, null, metadata, requiredFeatures.ToList(), null, subscriptionStateRules.ToList(), null, null, skuLink, disallowedActionVerbs.ToList(), templateDeploymentPolicy, extendedLocations.ToList(), linkedOperationRules.ToList(), resourceDeletionPolicy, null, null, null, null, null); |
| 64 | + |
| 65 | + /// <summary> Initializes a new instance of <see cref="Models.ResourceProviderEndpoint"/>. </summary> |
| 66 | + /// <param name="isEnabled"></param> |
| 67 | + /// <param name="apiVersions"></param> |
| 68 | + /// <param name="endpointUri"></param> |
| 69 | + /// <param name="locations"></param> |
| 70 | + /// <param name="requiredFeatures"></param> |
| 71 | + /// <param name="requiredFeaturesPolicy"></param> |
| 72 | + /// <param name="timeout"></param> |
| 73 | + /// <returns> A new <see cref="Models.ResourceProviderEndpoint"/> instance for mocking. </returns> |
| 74 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 75 | + public static ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = null, IEnumerable<string> apiVersions = null, Uri endpointUri = null, IEnumerable<AzureLocation> locations = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, TimeSpan? timeout = null) |
| 76 | + => new ResourceProviderEndpoint(isEnabled, apiVersions.ToList(), endpointUri, locations.ToList(), requiredFeatures.ToList(), null, timeout, null, null, null); |
| 77 | + |
| 78 | + /// <summary> Initializes a new instance of <see cref="Models.ResourceProviderManifest"/>. </summary> |
| 79 | + /// <param name="providerAuthenticationAllowedAudiences"></param> |
| 80 | + /// <param name="providerAuthorizations"></param> |
| 81 | + /// <param name="namespace"></param> |
| 82 | + /// <param name="providerVersion"></param> |
| 83 | + /// <param name="providerType"></param> |
| 84 | + /// <param name="requiredFeatures"></param> |
| 85 | + /// <param name="requiredFeaturesPolicy"></param> |
| 86 | + /// <param name="optInHeaders"></param> |
| 87 | + /// <param name="resourceTypes"></param> |
| 88 | + /// <param name="management"></param> |
| 89 | + /// <param name="capabilities"></param> |
| 90 | + /// <param name="metadata"> Anything. </param> |
| 91 | + /// <param name="globalNotificationEndpoints"></param> |
| 92 | + /// <param name="reRegisterSubscriptionMetadata"></param> |
| 93 | + /// <returns> A new <see cref="Models.ResourceProviderManifest"/> instance for mocking. </returns> |
| 94 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 95 | + public static ResourceProviderManifest ResourceProviderManifest(IEnumerable<string> providerAuthenticationAllowedAudiences = null, IEnumerable<ResourceProviderAuthorization> providerAuthorizations = null, string @namespace = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, OptInHeaderType? optInHeaders = null, IEnumerable<ProviderResourceType> resourceTypes = null, ResourceProviderManagement management = null, IEnumerable<ResourceProviderCapabilities> capabilities = null, BinaryData metadata = null, IEnumerable<ResourceProviderEndpoint> globalNotificationEndpoints = null, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null) |
| 96 | + => new ResourceProviderManifest(null, providerAuthorizations.ToList(), @namespace, null, null, providerVersion, providerType, requiredFeatures.ToList(), null, null, resourceTypes.ToList(), management, capabilities.ToList(), null, metadata, globalNotificationEndpoints.ToList(), reRegisterSubscriptionMetadata, null, null, null, null, null); |
| 97 | + |
| 98 | + /// <summary> Initializes a new instance of <see cref="Models.TemplateDeploymentPolicy"/>. </summary> |
| 99 | + /// <param name="capabilities"></param> |
| 100 | + /// <param name="preflightOptions"></param> |
| 101 | + /// <returns> A new <see cref="Models.TemplateDeploymentPolicy"/> instance for mocking. </returns> |
| 102 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 103 | + public static TemplateDeploymentPolicy TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities = default, TemplateDeploymentPreflightOption preflightOptions = default) |
| 104 | + => new TemplateDeploymentPolicy(capabilities, preflightOptions, null, null); |
| 105 | + } |
| 106 | +} |
0 commit comments