From 39b696559a9238b7e15f0124090dd09606601fd8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 18 Nov 2021 05:54:26 +0000 Subject: [PATCH] CodeGen from PR 16798 in Azure/azure-rest-api-specs Merge 62717238e65d7272eaefb3d8d2df37572d99a6a4 into 017671a81d01c5dbb1b2cb5ec410574ccf3d4c1a --- .../src/Generated/ApiManagementClient.cs | 275 +++- .../ApiManagementClientExtensions.cs | 125 ++ .../src/Generated/ApiSchemaOperations.cs | 66 +- .../ApiSchemaOperationsExtensions.cs | 60 +- .../src/Generated/IApiManagementClient.cs | 63 + .../src/Generated/IApiSchemaOperations.cs | 30 +- ...dNetworkDependenciesEndpointsOperations.cs | 53 + .../IPrivateEndpointConnectionOperations.cs | 247 +++ .../src/Generated/ISchemaOperations.cs | 239 +++ .../Models/AccessInformationContract.cs | 10 +- .../src/Generated/Models/AccessType.cs | 32 + .../Generated/Models/AdditionalLocation.cs | 26 +- .../Generated/Models/ApiContactInformation.cs | 74 + .../src/Generated/Models/ApiContract.cs | 63 +- .../Generated/Models/ApiContractProperties.cs | 22 +- .../Models/ApiCreateOrUpdateParameter.cs | 76 +- .../Generated/Models/ApiEntityBaseContract.cs | 49 +- .../src/Generated/Models/ApiExportResult.cs | 8 +- .../Generated/Models/ApiExportResultValue.cs | 2 +- .../Generated/Models/ApiLicenseInformation.cs | 61 + ...anagementServiceBackupRestoreParameters.cs | 71 +- .../ApiManagementServiceBaseProperties.cs | 63 +- .../Models/ApiManagementServiceResource.cs | 73 +- .../ApiManagementServiceUpdateParameters.cs | 73 +- .../Generated/Models/ApiReleaseContract.cs | 10 +- .../src/Generated/Models/ApiSchemaContract.cs | 123 ++ .../ApiTagResourceContractProperties.cs | 20 +- .../src/Generated/Models/ApiType.cs | 2 + .../src/Generated/Models/ApiUpdateContract.cs | 51 +- .../Generated/Models/ApiVersionSetContract.cs | 12 +- .../Models/ApiVersionSetEntityBase.cs | 2 +- .../Models/ApiVersionSetUpdateParameters.cs | 2 +- .../src/Generated/Models/ArmIdWrapper.cs | 49 + .../Generated/Models/AssociationContract.cs | 10 +- .../Models/AuthorizationServerContract.cs | 10 +- .../AuthorizationServerUpdateContract.cs | 10 +- .../Generated/Models/AzureEntityResource.cs | 62 + .../Generated/Models/BackendBaseParameters.cs | 4 +- .../src/Generated/Models/BackendContract.cs | 14 +- .../Models/BackendReconnectContract.cs | 10 +- .../Models/BackendUpdateParameters.cs | 4 +- .../src/Generated/Models/CacheContract.cs | 10 +- .../Generated/Models/CertificateContract.cs | 10 +- .../src/Generated/Models/CertificateSource.cs | 24 + .../src/Generated/Models/CertificateStatus.cs | 23 + .../src/Generated/Models/ConnectionStatus.cs | 24 + .../Models/ConnectivityCheckProtocol.cs | 23 + .../Models/ConnectivityCheckRequest.cs | 121 ++ .../ConnectivityCheckRequestDestination.cs | 77 + ...tivityCheckRequestProtocolConfiguration.cs | 54 + ...tProtocolConfigurationHTTPConfiguration.cs | 78 + .../Models/ConnectivityCheckRequestSource.cs | 79 + .../Models/ConnectivityCheckResponse.cs | 108 ++ .../src/Generated/Models/ConnectivityHop.cs | 94 ++ .../src/Generated/Models/ConnectivityIssue.cs | 89 + .../src/Generated/Models/ContentFormat.cs | 5 + .../Generated/Models/ContentItemContract.cs | 10 +- .../Generated/Models/ContentTypeContract.cs | 10 +- .../src/Generated/Models/CreatedByType.cs | 24 + .../Models/DeletedServiceContract.cs | 16 +- .../Generated/Models/DiagnosticContract.cs | 10 +- .../Generated/Models/EmailTemplateContract.cs | 14 +- .../Generated/Models/EndpointDependency.cs | 62 + .../src/Generated/Models/EndpointDetail.cs | 60 + .../Generated/Models/ExportResultFormat.cs | 8 +- .../GatewayCertificateAuthorityContract.cs | 10 +- .../src/Generated/Models/GatewayContract.cs | 10 +- .../GatewayHostnameConfigurationContract.cs | 10 +- .../src/Generated/Models/GroupContract.cs | 10 +- .../src/Generated/Models/HTTPHeader.cs | 77 + .../Generated/Models/HostnameConfiguration.cs | 22 +- .../Models/IdentityProviderContract.cs | 10 +- .../Models/IdentityProviderCreateContract.cs | 10 +- .../Models/IssueAttachmentContract.cs | 10 +- .../Generated/Models/IssueCommentContract.cs | 10 +- .../src/Generated/Models/IssueContract.cs | 10 +- .../src/Generated/Models/IssueType.cs | 29 + .../KeyVaultContractCreateProperties.cs | 4 +- .../Models/KeyVaultContractProperties.cs | 2 +- .../src/Generated/Models/LoggerContract.cs | 10 +- .../src/Generated/Models/Method.cs | 22 + .../Generated/Models/NamedValueContract.cs | 10 +- .../Models/NamedValueCreateContract.cs | 10 +- .../Generated/Models/NotificationContract.cs | 10 +- .../Models/OpenidConnectProviderContract.cs | 10 +- .../src/Generated/Models/OperationContract.cs | 12 +- .../Models/OperationEntityBaseContract.cs | 2 +- .../Models/OperationResultContract.cs | 10 +- .../OperationTagResourceContractProperties.cs | 12 +- .../Models/OperationUpdateContract.cs | 2 +- .../src/Generated/Models/Origin.cs | 23 + .../Models/OutboundEnvironmentEndpoint.cs | 70 + .../Models/OutboundEnvironmentEndpointList.cs | 77 + .../src/Generated/Models/ParameterContract.cs | 26 +- .../Models/ParameterExampleContract.cs | 77 + .../src/Generated/Models/PlatformVersion.cs | 37 + .../src/Generated/Models/PolicyContract.cs | 10 +- .../Models/PolicyDescriptionContract.cs | 10 +- .../Models/PortalDelegationSettings.cs | 10 +- .../Models/PortalRevisionContract.cs | 24 +- .../Generated/Models/PortalRevisionStatus.cs | 8 +- .../Models/PortalSettingsContract.cs | 10 +- .../Generated/Models/PortalSigninSettings.cs | 10 +- .../Generated/Models/PortalSignupSettings.cs | 10 +- .../Generated/Models/PreferredIPVersion.cs | 21 + .../src/Generated/Models/PrivateEndpoint.cs | 51 + .../Models/PrivateEndpointConnection.cs | 98 ++ ...vateEndpointConnectionProvisioningState.cs | 24 + .../PrivateEndpointConnectionRequest.cs | 63 + ...vateEndpointConnectionRequestProperties.cs | 56 + .../PrivateEndpointServiceConnectionStatus.cs | 23 + .../Generated/Models/PrivateLinkResource.cs | 81 + .../Models/PrivateLinkResourceListResult.cs | 55 + .../PrivateLinkServiceConnectionState.cs | 77 + .../src/Generated/Models/ProductContract.cs | 10 +- .../src/Generated/Models/Protocol.cs | 46 +- .../src/Generated/Models/ProxyResource.cs | 53 + .../Generated/Models/PublicNetworkAccess.cs | 22 + .../Models/RecipientEmailContract.cs | 10 +- .../Generated/Models/RecipientUserContract.cs | 10 +- .../RemotePrivateEndpointConnectionWrapper.cs | 126 ++ .../Models/RepresentationContract.cs | 19 +- .../src/Generated/Models/Resource.cs | 25 +- .../src/Generated/Models/SchemaContract.cs | 79 +- .../Models/SchemaCreateOrUpdateHeaders.cs | 55 + .../Models/SchemaGetEntityTagHeaders.cs | 53 + .../src/Generated/Models/SchemaGetHeaders.cs | 53 + .../src/Generated/Models/SchemaType.cs | 28 + .../src/Generated/Models/Severity.cs | 22 + .../src/Generated/Models/SoapApiType.cs | 10 +- .../Generated/Models/SubscriptionContract.cs | 10 +- .../src/Generated/Models/SystemData.cs | 103 ++ .../src/Generated/Models/TagContract.cs | 10 +- .../Models/TagDescriptionContract.cs | 10 +- .../Generated/Models/TagResourceContract.cs | 4 +- .../TenantConfigurationSyncStateContract.cs | 11 +- .../Models/TenantSettingsContract.cs | 10 +- .../src/Generated/Models/TrackedResource.cs | 87 + .../src/Generated/Models/UserContract.cs | 10 +- ...dNetworkDependenciesEndpointsOperations.cs | 261 +++ ...pendenciesEndpointsOperationsExtensions.cs | 67 + .../PrivateEndpointConnectionOperations.cs | 1372 ++++++++++++++++ ...eEndpointConnectionOperationsExtensions.cs | 389 +++++ .../src/Generated/SchemaOperations.cs | 1449 +++++++++++++++++ .../Generated/SchemaOperationsExtensions.cs | 387 +++++ .../Generated/SdkInfo_ApiManagementClient.cs | 148 +- 146 files changed, 8918 insertions(+), 605 deletions(-) create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClientExtensions.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IOutboundNetworkDependenciesEndpointsOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IPrivateEndpointConnectionOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessType.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContactInformation.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ArmIdWrapper.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AzureEntityResource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateSource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateStatus.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectionStatus.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckProtocol.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequest.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckResponse.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityHop.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityIssue.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CreatedByType.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDependency.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDetail.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HTTPHeader.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueType.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Method.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Origin.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterExampleContract.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PlatformVersion.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PreferredIPVersion.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpoint.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnection.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequest.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResourceListResult.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkServiceConnectionState.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProxyResource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PublicNetworkAccess.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaType.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Severity.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SystemData.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TrackedResource.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperationsExtensions.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs index b8a22a0c536b..772df3ac4e9e 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs @@ -20,6 +20,8 @@ namespace Microsoft.Azure.Management.ApiManagement using System.Linq; using System.Net; using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; /// /// ApiManagement Client @@ -291,6 +293,11 @@ public partial class ApiManagementClient : ServiceClient, I /// public virtual IOpenIdConnectProviderOperations OpenIdConnectProvider { get; private set; } + /// + /// Gets the IOutboundNetworkDependenciesEndpointsOperations. + /// + public virtual IOutboundNetworkDependenciesEndpointsOperations OutboundNetworkDependenciesEndpoints { get; private set; } + /// /// Gets the IPolicyOperations. /// @@ -326,6 +333,11 @@ public partial class ApiManagementClient : ServiceClient, I /// public virtual IDelegationSettingsOperations DelegationSettings { get; private set; } + /// + /// Gets the IPrivateEndpointConnectionOperations. + /// + public virtual IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; private set; } + /// /// Gets the IProductOperations. /// @@ -371,6 +383,11 @@ public partial class ApiManagementClient : ServiceClient, I /// public virtual IReportsOperations Reports { get; private set; } + /// + /// Gets the ISchemaOperations. + /// + public virtual ISchemaOperations Schema { get; private set; } + /// /// Gets the ITenantSettingsOperations. /// @@ -720,6 +737,7 @@ private void Initialize() NotificationRecipientUser = new NotificationRecipientUserOperations(this); NotificationRecipientEmail = new NotificationRecipientEmailOperations(this); OpenIdConnectProvider = new OpenIdConnectProviderOperations(this); + OutboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsOperations(this); Policy = new PolicyOperations(this); PolicyDescription = new PolicyDescriptionOperations(this); PortalRevision = new PortalRevisionOperations(this); @@ -727,6 +745,7 @@ private void Initialize() SignInSettings = new SignInSettingsOperations(this); SignUpSettings = new SignUpSettingsOperations(this); DelegationSettings = new DelegationSettingsOperations(this); + PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this); Product = new ProductOperations(this); ProductApi = new ProductApiOperations(this); ProductGroup = new ProductGroupOperations(this); @@ -736,6 +755,7 @@ private void Initialize() QuotaByPeriodKeys = new QuotaByPeriodKeysOperations(this); Region = new RegionOperations(this); Reports = new ReportsOperations(this); + Schema = new SchemaOperations(this); TenantSettings = new TenantSettingsOperations(this); ApiManagementSkus = new ApiManagementSkusOperations(this); Subscription = new SubscriptionOperations(this); @@ -750,7 +770,7 @@ private void Initialize() UserConfirmationPassword = new UserConfirmationPasswordOperations(this); ApiExport = new ApiExportOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-12-01"; + ApiVersion = "2021-04-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -784,5 +804,258 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> PerformConnectivityCheckAsyncWithHttpMessagesAsync(string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPerformConnectivityCheckAsyncWithHttpMessagesAsync(resourceGroupName, serviceName, connectivityCheckRequestParams, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginPerformConnectivityCheckAsyncWithHttpMessagesAsync(string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + } + if (SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + } + if (connectivityCheckRequestParams == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectivityCheckRequestParams"); + } + if (connectivityCheckRequestParams != null) + { + connectivityCheckRequestParams.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("connectivityCheckRequestParams", connectivityCheckRequestParams); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPerformConnectivityCheckAsync", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + List _queryParameters = new List(); + if (ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(connectivityCheckRequestParams != null) + { + _requestContent = SafeJsonConvert.SerializeObject(connectivityCheckRequestParams, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClientExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClientExtensions.cs new file mode 100644 index 000000000000..8b67b9045845 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClientExtensions.cs @@ -0,0 +1,125 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiManagementClient. + /// + public static partial class ApiManagementClientExtensions + { + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + public static ConnectivityCheckResponse PerformConnectivityCheckAsync(this IApiManagementClient operations, string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams) + { + return operations.PerformConnectivityCheckAsyncAsync(resourceGroupName, serviceName, connectivityCheckRequestParams).GetAwaiter().GetResult(); + } + + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// The cancellation token. + /// + public static async Task PerformConnectivityCheckAsyncAsync(this IApiManagementClient operations, string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PerformConnectivityCheckAsyncWithHttpMessagesAsync(resourceGroupName, serviceName, connectivityCheckRequestParams, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + public static ConnectivityCheckResponse BeginPerformConnectivityCheckAsync(this IApiManagementClient operations, string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams) + { + return operations.BeginPerformConnectivityCheckAsyncAsync(resourceGroupName, serviceName, connectivityCheckRequestParams).GetAwaiter().GetResult(); + } + + /// + /// Performs a connectivity check between the API Management service and a + /// given destination, and returns metrics for the connection, as well as + /// errors encountered while trying to establish it. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPerformConnectivityCheckAsyncAsync(this IApiManagementClient operations, string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginPerformConnectivityCheckAsyncWithHttpMessagesAsync(resourceGroupName, serviceName, connectivityCheckRequestParams, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs index 3dffc0888ef5..e966a5b1e5bf 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs @@ -98,7 +98,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -286,7 +286,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -299,7 +299,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -334,8 +334,8 @@ internal ApiSchemaOperations(ApiManagementClient client) /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// Headers that will be added to request. @@ -413,10 +413,6 @@ internal ApiSchemaOperations(ApiManagementClient client) { throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); } - if (!System.Text.RegularExpressions.Regex.IsMatch(schemaId, "^[^*#&+:<>?]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "schemaId", "^[^*#&+:<>?]+$"); - } } if (Client.ApiVersion == null) { @@ -583,8 +579,8 @@ internal ApiSchemaOperations(ApiManagementClient client) /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// Headers that will be added to request. @@ -607,7 +603,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -665,10 +661,6 @@ internal ApiSchemaOperations(ApiManagementClient client) { throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); } - if (!System.Text.RegularExpressions.Regex.IsMatch(schemaId, "^[^*#&+:<>?]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "schemaId", "^[^*#&+:<>?]+$"); - } } if (Client.ApiVersion == null) { @@ -793,7 +785,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -806,7 +798,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -853,8 +845,8 @@ internal ApiSchemaOperations(ApiManagementClient client) /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -869,10 +861,10 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -891,8 +883,8 @@ internal ApiSchemaOperations(ApiManagementClient client) /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// ETag of the Entity. ETag should match the current entity state from the @@ -978,10 +970,6 @@ internal ApiSchemaOperations(ApiManagementClient client) { throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); } - if (!System.Text.RegularExpressions.Regex.IsMatch(schemaId, "^[^*#&+:<>?]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "schemaId", "^[^*#&+:<>?]+$"); - } } if (ifMatch == null) { @@ -1153,8 +1141,8 @@ internal ApiSchemaOperations(ApiManagementClient client) /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -1184,7 +1172,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1242,10 +1230,6 @@ internal ApiSchemaOperations(ApiManagementClient client) { throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); } - if (!System.Text.RegularExpressions.Regex.IsMatch(schemaId, "^[^*#&+:<>?]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "schemaId", "^[^*#&+:<>?]+$"); - } } if (parameters == null) { @@ -1394,7 +1378,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1407,7 +1391,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1425,7 +1409,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1484,7 +1468,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1593,7 +1577,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1606,7 +1590,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs index 3a6aa229b084..d03f145d68ac 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs @@ -51,7 +51,7 @@ public static partial class ApiSchemaOperationsExtensions /// /// Number of records to skip. /// - public static IPage ListByApi(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?)) + public static IPage ListByApi(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?)) { return operations.ListByApiAsync(resourceGroupName, serviceName, apiId, filter, top, skip).GetAwaiter().GetResult(); } @@ -89,7 +89,7 @@ public static partial class ApiSchemaOperationsExtensions /// /// The cancellation token. /// - public static async Task> ListByApiAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByApiAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByApiWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) { @@ -116,8 +116,8 @@ public static partial class ApiSchemaOperationsExtensions /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// public static ApiSchemaGetEntityTagHeaders GetEntityTag(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId) { @@ -143,8 +143,8 @@ public static ApiSchemaGetEntityTagHeaders GetEntityTag(this IApiSchemaOperation /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The cancellation token. @@ -175,10 +175,10 @@ public static ApiSchemaGetEntityTagHeaders GetEntityTag(this IApiSchemaOperation /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// - public static SchemaContract Get(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId) + public static ApiSchemaContract Get(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId) { return operations.GetAsync(resourceGroupName, serviceName, apiId, schemaId).GetAwaiter().GetResult(); } @@ -201,13 +201,13 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The cancellation token. /// - public static async Task GetAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, null, cancellationToken).ConfigureAwait(false)) { @@ -233,8 +233,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -243,7 +243,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static SchemaContract CreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + public static ApiSchemaContract CreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string)) { return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -266,8 +266,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -279,7 +279,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -305,8 +305,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// ETag of the Entity. ETag should match the current entity state from the @@ -339,8 +339,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// ETag of the Entity. ETag should match the current entity state from the @@ -376,8 +376,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -386,7 +386,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static SchemaContract BeginCreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + public static ApiSchemaContract BeginCreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string)) { return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -409,8 +409,8 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management service + /// instance. /// /// /// The schema contents to apply. @@ -422,7 +422,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The cancellation token. /// - public static async Task BeginCreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -439,7 +439,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListByApiNext(this IApiSchemaOperations operations, string nextPageLink) + public static IPage ListByApiNext(this IApiSchemaOperations operations, string nextPageLink) { return operations.ListByApiNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -456,7 +456,7 @@ public static IPage ListByApiNext(this IApiSchemaOperations oper /// /// The cancellation token. /// - public static async Task> ListByApiNextAsync(this IApiSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByApiNextAsync(this IApiSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByApiNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs index c7297cf44790..6cf5d81c637d 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs @@ -14,6 +14,10 @@ namespace Microsoft.Azure.Management.ApiManagement using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// ApiManagement Client @@ -286,6 +290,11 @@ public partial interface IApiManagementClient : System.IDisposable /// IOpenIdConnectProviderOperations OpenIdConnectProvider { get; } + /// + /// Gets the IOutboundNetworkDependenciesEndpointsOperations. + /// + IOutboundNetworkDependenciesEndpointsOperations OutboundNetworkDependenciesEndpoints { get; } + /// /// Gets the IPolicyOperations. /// @@ -321,6 +330,11 @@ public partial interface IApiManagementClient : System.IDisposable /// IDelegationSettingsOperations DelegationSettings { get; } + /// + /// Gets the IPrivateEndpointConnectionOperations. + /// + IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; } + /// /// Gets the IProductOperations. /// @@ -366,6 +380,11 @@ public partial interface IApiManagementClient : System.IDisposable /// IReportsOperations Reports { get; } + /// + /// Gets the ISchemaOperations. + /// + ISchemaOperations Schema { get; } + /// /// Gets the ITenantSettingsOperations. /// @@ -431,5 +450,49 @@ public partial interface IApiManagementClient : System.IDisposable /// IApiExportOperations ApiExport { get; } + /// + /// Performs a connectivity check between the API Management service + /// and a given destination, and returns metrics for the connection, as + /// well as errors encountered while trying to establish it. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PerformConnectivityCheckAsyncWithHttpMessagesAsync(string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Performs a connectivity check between the API Management service + /// and a given destination, and returns metrics for the connection, as + /// well as errors encountered while trying to establish it. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Connectivity Check request parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> BeginPerformConnectivityCheckAsyncWithHttpMessagesAsync(string resourceGroupName, string serviceName, ConnectivityCheckRequest connectivityCheckRequestParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs index 2489af713cec..8d7c3c547038 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs @@ -65,7 +65,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the entity state (Etag) version of the schema specified by its /// identifier. @@ -82,8 +82,8 @@ public partial interface IApiSchemaOperations /// suffix where n is the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management + /// service instance. /// /// /// The headers that will be added to request. @@ -113,8 +113,8 @@ public partial interface IApiSchemaOperations /// suffix where n is the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management + /// service instance. /// /// /// The headers that will be added to request. @@ -131,7 +131,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates or updates schema configuration for the API. /// @@ -147,8 +147,8 @@ public partial interface IApiSchemaOperations /// suffix where n is the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management + /// service instance. /// /// /// The schema contents to apply. @@ -172,7 +172,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes the schema configuration at the Api. /// @@ -188,8 +188,8 @@ public partial interface IApiSchemaOperations /// suffix where n is the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management + /// service instance. /// /// /// ETag of the Entity. ETag should match the current entity state from @@ -227,8 +227,8 @@ public partial interface IApiSchemaOperations /// suffix where n is the revision number. /// /// - /// Schema identifier within an API. Must be unique in the current API - /// Management service instance. + /// Schema id identifier. Must be unique in the current API Management + /// service instance. /// /// /// The schema contents to apply. @@ -252,7 +252,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get the schema configuration at the API level. /// @@ -274,6 +274,6 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IOutboundNetworkDependenciesEndpointsOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IOutboundNetworkDependenciesEndpointsOperations.cs new file mode 100644 index 000000000000..11958836ce62 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IOutboundNetworkDependenciesEndpointsOperations.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OutboundNetworkDependenciesEndpointsOperations operations. + /// + public partial interface IOutboundNetworkDependenciesEndpointsOperations + { + /// + /// Gets the network endpoints of all outbound dependencies of a + /// ApiManagement service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IPrivateEndpointConnectionOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IPrivateEndpointConnectionOperations.cs new file mode 100644 index 000000000000..df1d5bb1cfb4 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IPrivateEndpointConnectionOperations.cs @@ -0,0 +1,247 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndpointConnectionOperations operations. + /// + public partial interface IPrivateEndpointConnectionOperations + { + /// + /// Lists all private endpoint connections of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the Private Endpoint Connection specified by + /// its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new Private Endpoint Connection or updates an existing + /// one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Description for Gets the private link resources + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Description for Gets the private link resources + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private link resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetPrivateLinkResourceWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateLinkSubResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new Private Endpoint Connection or updates an existing + /// one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs new file mode 100644 index 000000000000..db73a9c8a65f --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs @@ -0,0 +1,239 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SchemaOperations operations. + /// + public partial interface ISchemaOperations + { + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the entity state (Etag) version of the Schema specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the Schema specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates new or updates existing specified Schema of the API + /// Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but + /// required when updating an entity. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific Schema. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// ETag of the Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates new or updates existing specified Schema of the API + /// Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but + /// required when updating an entity. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessInformationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessInformationContract.cs index 9f7f5ad314b9..5fe16b158956 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessInformationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessInformationContract.cs @@ -32,10 +32,12 @@ public AccessInformationContract() /// /// Initializes a new instance of the AccessInformationContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Access Information type /// ('access' or 'gitAccess') /// Principal (User) Identifier. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessType.cs new file mode 100644 index 000000000000..80c25d9f2c0b --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AccessType.cs @@ -0,0 +1,32 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for AccessType. + /// + public static class AccessType + { + /// + /// Use access key. + /// + public const string AccessKey = "AccessKey"; + /// + /// Use system assigned managed identity. + /// + public const string SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity"; + /// + /// Use user assigned managed identity. + /// + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AdditionalLocation.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AdditionalLocation.cs index bd8c57af87bb..5024d576554b 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AdditionalLocation.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AdditionalLocation.cs @@ -47,6 +47,10 @@ public AdditionalLocation() /// Internal Virtual Network in a particular additional location. /// Available only for Basic, Standard, Premium and Isolated /// SKU. + /// Public Standard SKU IP V4 based IP + /// address to be associated with Virtual Network deployed service in + /// the location. Supported only for Premium SKU being deployed in + /// Virtual Network. /// Virtual network /// configuration for the location. /// Gateway URL of the API Management @@ -54,16 +58,21 @@ public AdditionalLocation() /// Property only valid for an Api /// Management service deployed in multiple locations. This can be used /// to disable the gateway in this additional location. - public AdditionalLocation(string location, ApiManagementServiceSkuProperties sku, IList zones = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), string gatewayRegionalUrl = default(string), bool? disableGateway = default(bool?)) + /// Compute Platform Version running the + /// service. Possible values include: 'undetermined', 'stv1', 'stv2', + /// 'mtv1' + public AdditionalLocation(string location, ApiManagementServiceSkuProperties sku, IList zones = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), string publicIpAddressId = default(string), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), string gatewayRegionalUrl = default(string), bool? disableGateway = default(bool?), string platformVersion = default(string)) { Location = location; Sku = sku; Zones = zones; PublicIPAddresses = publicIPAddresses; PrivateIPAddresses = privateIPAddresses; + PublicIpAddressId = publicIpAddressId; VirtualNetworkConfiguration = virtualNetworkConfiguration; GatewayRegionalUrl = gatewayRegionalUrl; DisableGateway = disableGateway; + PlatformVersion = platformVersion; CustomInit(); } @@ -109,6 +118,14 @@ public AdditionalLocation() [JsonProperty(PropertyName = "privateIPAddresses")] public IList PrivateIPAddresses { get; private set; } + /// + /// Gets or sets public Standard SKU IP V4 based IP address to be + /// associated with Virtual Network deployed service in the location. + /// Supported only for Premium SKU being deployed in Virtual Network. + /// + [JsonProperty(PropertyName = "publicIpAddressId")] + public string PublicIpAddressId { get; set; } + /// /// Gets or sets virtual network configuration for the location. /// @@ -129,6 +146,13 @@ public AdditionalLocation() [JsonProperty(PropertyName = "disableGateway")] public bool? DisableGateway { get; set; } + /// + /// Gets compute Platform Version running the service. Possible values + /// include: 'undetermined', 'stv1', 'stv2', 'mtv1' + /// + [JsonProperty(PropertyName = "platformVersion")] + public string PlatformVersion { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContactInformation.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContactInformation.cs new file mode 100644 index 000000000000..a6264926030b --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContactInformation.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// API contact information + /// + public partial class ApiContactInformation + { + /// + /// Initializes a new instance of the ApiContactInformation class. + /// + public ApiContactInformation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiContactInformation class. + /// + /// The identifying name of the contact + /// person/organization + /// The URL pointing to the contact information. MUST + /// be in the format of a URL + /// The email address of the contact + /// person/organization. MUST be in the format of an email + /// address + public ApiContactInformation(string name = default(string), string url = default(string), string email = default(string)) + { + Name = name; + Url = url; + Email = email; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identifying name of the contact + /// person/organization + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the URL pointing to the contact information. MUST be + /// in the format of a URL + /// + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or sets the email address of the contact person/organization. + /// MUST be in the format of an email address + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContract.cs index c9ef93de9951..25382de19aa9 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContract.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api details. + /// API details. /// [Rest.Serialization.JsonTransformation] public partial class ApiContract : Resource @@ -39,10 +39,12 @@ public ApiContract() /// instance. It is appended to the API endpoint base URL specified /// during the service instance creation to form a public URL for this /// API. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of the API. May include HTML /// formatting tags. /// Collection of authentication @@ -50,23 +52,27 @@ public ApiContract() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. /// API identifier of the source API. /// API name. Must be 1 to 300 characters /// long. @@ -76,7 +82,7 @@ public ApiContract() /// Describes on which protocols the operations /// in this API can be invoked. /// Version set details - public ApiContract(string path, string id = default(string), string name = default(string), string type = default(string), string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails)) + public ApiContract(string path, string id = default(string), string name = default(string), string type = default(string), string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails)) : base(id, name, type) { Description = description; @@ -91,6 +97,9 @@ public ApiContract() ApiVersionDescription = apiVersionDescription; ApiVersionSetId = apiVersionSetId; SubscriptionRequired = subscriptionRequired; + TermsOfServiceUrl = termsOfServiceUrl; + Contact = contact; + License = license; SourceApiId = sourceApiId; DisplayName = displayName; ServiceUrl = serviceUrl; @@ -126,20 +135,21 @@ public ApiContract() public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// - /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// Gets or sets type of API. Possible values include: 'http', 'soap', + /// 'websocket', 'graphql' /// [JsonProperty(PropertyName = "properties.type")] public string ApiType { get; set; } /// - /// Gets or sets describes the Revision of the Api. If no value is + /// Gets or sets describes the revision of the API. If no value is /// provided, default revision 1 is created /// [JsonProperty(PropertyName = "properties.apiRevision")] public string ApiRevision { get; set; } /// - /// Gets or sets indicates the Version identifier of the API if the API + /// Gets or sets indicates the version identifier of the API if the API /// is versioned /// [JsonProperty(PropertyName = "properties.apiVersion")] @@ -158,13 +168,13 @@ public ApiContract() public bool? IsOnline { get; private set; } /// - /// Gets or sets description of the Api Revision. + /// Gets or sets description of the API Revision. /// [JsonProperty(PropertyName = "properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// - /// Gets or sets description of the Api Version. + /// Gets or sets description of the API Version. /// [JsonProperty(PropertyName = "properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } @@ -182,6 +192,25 @@ public ApiContract() [JsonProperty(PropertyName = "properties.subscriptionRequired")] public bool? SubscriptionRequired { get; set; } + /// + /// Gets or sets A URL to the Terms of Service for the API. MUST be in + /// the format of a URL. + /// + [JsonProperty(PropertyName = "properties.termsOfServiceUrl")] + public string TermsOfServiceUrl { get; set; } + + /// + /// Gets or sets contact information for the API. + /// + [JsonProperty(PropertyName = "properties.contact")] + public ApiContactInformation Contact { get; set; } + + /// + /// Gets or sets license information for the API. + /// + [JsonProperty(PropertyName = "properties.license")] + public ApiLicenseInformation License { get; set; } + /// /// Gets or sets API identifier of the source API. /// @@ -215,7 +244,7 @@ public ApiContract() /// API can be invoked. /// [JsonProperty(PropertyName = "properties.protocols")] - public IList Protocols { get; set; } + public IList Protocols { get; set; } /// /// Gets or sets version set details diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContractProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContractProperties.cs index abfb457626dd..b8b5782ec907 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContractProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiContractProperties.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Entity Properties + /// API Entity Properties /// public partial class ApiContractProperties : ApiEntityBaseContract { @@ -44,23 +44,27 @@ public ApiContractProperties() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. /// API identifier of the source API. /// API name. Must be 1 to 300 characters /// long. @@ -70,8 +74,8 @@ public ApiContractProperties() /// Describes on which protocols the operations /// in this API can be invoked. /// Version set details - public ApiContractProperties(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails)) - : base(description, authenticationSettings, subscriptionKeyParameterNames, apiType, apiRevision, apiVersion, isCurrent, isOnline, apiRevisionDescription, apiVersionDescription, apiVersionSetId, subscriptionRequired) + public ApiContractProperties(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails)) + : base(description, authenticationSettings, subscriptionKeyParameterNames, apiType, apiRevision, apiVersion, isCurrent, isOnline, apiRevisionDescription, apiVersionDescription, apiVersionSetId, subscriptionRequired, termsOfServiceUrl, contact, license) { SourceApiId = sourceApiId; DisplayName = displayName; @@ -120,7 +124,7 @@ public ApiContractProperties() /// API can be invoked. /// [JsonProperty(PropertyName = "protocols")] - public IList Protocols { get; set; } + public IList Protocols { get; set; } /// /// Gets or sets version set details diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiCreateOrUpdateParameter.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiCreateOrUpdateParameter.cs index 80b4ad63367b..1a911eefb437 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiCreateOrUpdateParameter.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiCreateOrUpdateParameter.cs @@ -46,23 +46,27 @@ public ApiCreateOrUpdateParameter() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. /// API identifier of the source API. /// API name. Must be 1 to 300 characters /// long. @@ -77,14 +81,16 @@ public ApiCreateOrUpdateParameter() /// getting imported. Possible values include: 'wadl-xml', /// 'wadl-link-json', 'swagger-json', 'swagger-link-json', 'wsdl', /// 'wsdl-link', 'openapi', 'openapi+json', 'openapi-link', - /// 'openapi+json-link' + /// 'openapi+json-link', 'graphql-link' /// Criteria to limit import of WSDL to a /// subset of the document. - /// Type of Api to create. - /// * `http` creates a SOAP to REST API - /// * `soap` creates a SOAP pass-through API. Possible values include: - /// 'SoapToRest', 'SoapPassThrough' - public ApiCreateOrUpdateParameter(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails), string value = default(string), string format = default(string), ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = default(ApiCreateOrUpdatePropertiesWsdlSelector), string soapApiType = default(string)) + /// Type of API to create. + /// * `http` creates a REST API + /// * `soap` creates a SOAP pass-through API + /// * `websocket` creates websocket API + /// * `graphql` creates GraphQL API. Possible values include: + /// 'SoapToRest', 'SoapPassThrough', 'WebSocket', 'GraphQL' + public ApiCreateOrUpdateParameter(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation), string sourceApiId = default(string), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), ApiVersionSetContractDetails apiVersionSet = default(ApiVersionSetContractDetails), string value = default(string), string format = default(string), ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = default(ApiCreateOrUpdatePropertiesWsdlSelector), string soapApiType = default(string)) { Description = description; AuthenticationSettings = authenticationSettings; @@ -98,6 +104,9 @@ public ApiCreateOrUpdateParameter() ApiVersionDescription = apiVersionDescription; ApiVersionSetId = apiVersionSetId; SubscriptionRequired = subscriptionRequired; + TermsOfServiceUrl = termsOfServiceUrl; + Contact = contact; + License = license; SourceApiId = sourceApiId; DisplayName = displayName; ServiceUrl = serviceUrl; @@ -137,20 +146,21 @@ public ApiCreateOrUpdateParameter() public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// - /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// Gets or sets type of API. Possible values include: 'http', 'soap', + /// 'websocket', 'graphql' /// [JsonProperty(PropertyName = "properties.type")] public string ApiType { get; set; } /// - /// Gets or sets describes the Revision of the Api. If no value is + /// Gets or sets describes the revision of the API. If no value is /// provided, default revision 1 is created /// [JsonProperty(PropertyName = "properties.apiRevision")] public string ApiRevision { get; set; } /// - /// Gets or sets indicates the Version identifier of the API if the API + /// Gets or sets indicates the version identifier of the API if the API /// is versioned /// [JsonProperty(PropertyName = "properties.apiVersion")] @@ -169,13 +179,13 @@ public ApiCreateOrUpdateParameter() public bool? IsOnline { get; private set; } /// - /// Gets or sets description of the Api Revision. + /// Gets or sets description of the API Revision. /// [JsonProperty(PropertyName = "properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// - /// Gets or sets description of the Api Version. + /// Gets or sets description of the API Version. /// [JsonProperty(PropertyName = "properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } @@ -193,6 +203,25 @@ public ApiCreateOrUpdateParameter() [JsonProperty(PropertyName = "properties.subscriptionRequired")] public bool? SubscriptionRequired { get; set; } + /// + /// Gets or sets A URL to the Terms of Service for the API. MUST be in + /// the format of a URL. + /// + [JsonProperty(PropertyName = "properties.termsOfServiceUrl")] + public string TermsOfServiceUrl { get; set; } + + /// + /// Gets or sets contact information for the API. + /// + [JsonProperty(PropertyName = "properties.contact")] + public ApiContactInformation Contact { get; set; } + + /// + /// Gets or sets license information for the API. + /// + [JsonProperty(PropertyName = "properties.license")] + public ApiLicenseInformation License { get; set; } + /// /// Gets or sets API identifier of the source API. /// @@ -226,7 +255,7 @@ public ApiCreateOrUpdateParameter() /// API can be invoked. /// [JsonProperty(PropertyName = "properties.protocols")] - public IList Protocols { get; set; } + public IList Protocols { get; set; } /// /// Gets or sets version set details @@ -244,7 +273,8 @@ public ApiCreateOrUpdateParameter() /// Gets or sets format of the Content in which the API is getting /// imported. Possible values include: 'wadl-xml', 'wadl-link-json', /// 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', - /// 'openapi', 'openapi+json', 'openapi-link', 'openapi+json-link' + /// 'openapi', 'openapi+json', 'openapi-link', 'openapi+json-link', + /// 'graphql-link' /// [JsonProperty(PropertyName = "properties.format")] public string Format { get; set; } @@ -257,10 +287,12 @@ public ApiCreateOrUpdateParameter() public ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get; set; } /// - /// Gets or sets type of Api to create. - /// * `http` creates a SOAP to REST API - /// * `soap` creates a SOAP pass-through API. Possible values include: - /// 'SoapToRest', 'SoapPassThrough' + /// Gets or sets type of API to create. + /// * `http` creates a REST API + /// * `soap` creates a SOAP pass-through API + /// * `websocket` creates websocket API + /// * `graphql` creates GraphQL API. Possible values include: + /// 'SoapToRest', 'SoapPassThrough', 'WebSocket', 'GraphQL' /// [JsonProperty(PropertyName = "properties.apiType")] public string SoapApiType { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs index 3a3644053459..8af67e6d588c 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs @@ -37,24 +37,28 @@ public ApiEntityBaseContract() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. - public ApiEntityBaseContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?)) + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. + public ApiEntityBaseContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation)) { Description = description; AuthenticationSettings = authenticationSettings; @@ -68,6 +72,9 @@ public ApiEntityBaseContract() ApiVersionDescription = apiVersionDescription; ApiVersionSetId = apiVersionSetId; SubscriptionRequired = subscriptionRequired; + TermsOfServiceUrl = termsOfServiceUrl; + Contact = contact; + License = license; CustomInit(); } @@ -97,20 +104,21 @@ public ApiEntityBaseContract() public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// - /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// Gets or sets type of API. Possible values include: 'http', 'soap', + /// 'websocket', 'graphql' /// [JsonProperty(PropertyName = "type")] public string ApiType { get; set; } /// - /// Gets or sets describes the Revision of the Api. If no value is + /// Gets or sets describes the revision of the API. If no value is /// provided, default revision 1 is created /// [JsonProperty(PropertyName = "apiRevision")] public string ApiRevision { get; set; } /// - /// Gets or sets indicates the Version identifier of the API if the API + /// Gets or sets indicates the version identifier of the API if the API /// is versioned /// [JsonProperty(PropertyName = "apiVersion")] @@ -129,13 +137,13 @@ public ApiEntityBaseContract() public bool? IsOnline { get; private set; } /// - /// Gets or sets description of the Api Revision. + /// Gets or sets description of the API Revision. /// [JsonProperty(PropertyName = "apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// - /// Gets or sets description of the Api Version. + /// Gets or sets description of the API Version. /// [JsonProperty(PropertyName = "apiVersionDescription")] public string ApiVersionDescription { get; set; } @@ -153,6 +161,25 @@ public ApiEntityBaseContract() [JsonProperty(PropertyName = "subscriptionRequired")] public bool? SubscriptionRequired { get; set; } + /// + /// Gets or sets A URL to the Terms of Service for the API. MUST be in + /// the format of a URL. + /// + [JsonProperty(PropertyName = "termsOfServiceUrl")] + public string TermsOfServiceUrl { get; set; } + + /// + /// Gets or sets contact information for the API. + /// + [JsonProperty(PropertyName = "contact")] + public ApiContactInformation Contact { get; set; } + + /// + /// Gets or sets license information for the API. + /// + [JsonProperty(PropertyName = "license")] + public ApiLicenseInformation License { get; set; } + /// /// Validate the object. /// diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResult.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResult.cs index cb2027f46a8f..8845669fc1e7 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResult.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResult.cs @@ -30,12 +30,12 @@ public ApiExportResult() /// Initializes a new instance of the ApiExportResult class. /// /// ResourceId of the API which was exported. - /// Format in which the Api Details + /// Format in which the API Details /// are exported to the Storage Blob with Sas Key valid for 5 minutes. /// Possible values include: 'Swagger', 'Wsdl', 'Wadl', /// 'OpenApi' /// The object defining the schema of the exported - /// Api Detail + /// API Detail public ApiExportResult(string id = default(string), string exportResultFormat = default(string), ApiExportResultValue value = default(ApiExportResultValue)) { Id = id; @@ -56,7 +56,7 @@ public ApiExportResult() public string Id { get; set; } /// - /// Gets or sets format in which the Api Details are exported to the + /// Gets or sets format in which the API Details are exported to the /// Storage Blob with Sas Key valid for 5 minutes. Possible values /// include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi' /// @@ -64,7 +64,7 @@ public ApiExportResult() public string ExportResultFormat { get; set; } /// - /// Gets or sets the object defining the schema of the exported Api + /// Gets or sets the object defining the schema of the exported API /// Detail /// [JsonProperty(PropertyName = "value")] diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResultValue.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResultValue.cs index 95f6644dfc5c..3b0f2b3a31b6 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResultValue.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiExportResultValue.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// The object defining the schema of the exported Api Detail + /// The object defining the schema of the exported API Detail /// public partial class ApiExportResultValue { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs new file mode 100644 index 000000000000..885625460020 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// API license information + /// + public partial class ApiLicenseInformation + { + /// + /// Initializes a new instance of the ApiLicenseInformation class. + /// + public ApiLicenseInformation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiLicenseInformation class. + /// + /// The license name used for the API + /// A URL to the license used for the API. MUST be in + /// the format of a URL + public ApiLicenseInformation(string name = default(string), string url = default(string)) + { + Name = name; + Url = url; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the license name used for the API + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets a URL to the license used for the API. MUST be in the + /// format of a URL + /// + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs index 1e4d4935c980..5f07c540f4e2 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs @@ -33,20 +33,29 @@ public ApiManagementServiceBackupRestoreParameters() /// Initializes a new instance of the /// ApiManagementServiceBackupRestoreParameters class. /// - /// Azure Cloud Storage account (used to - /// place/retrieve the backup) name. - /// Azure Cloud Storage account (used to - /// place/retrieve the backup) access key. - /// Azure Cloud Storage blob container name - /// used to place/retrieve the backup. + /// The name of the Azure storage account + /// (used to place/retrieve the backup). + /// The name of the blob container (used to + /// place/retrieve the backup). /// The name of the backup file to - /// create. - public ApiManagementServiceBackupRestoreParameters(string storageAccount, string accessKey, string containerName, string backupName) + /// create/retrieve. + /// The type of access to be used for the + /// storage account. Possible values include: 'AccessKey', + /// 'SystemAssignedManagedIdentity', + /// 'UserAssignedManagedIdentity' + /// Storage account access key. Required only + /// if `accessType` is set to `AccessKey`. + /// The Client ID of user assigned managed + /// identity. Required only if `accessType` is set to + /// `UserAssignedManagedIdentity`. + public ApiManagementServiceBackupRestoreParameters(string storageAccount, string containerName, string backupName, string accessType = default(string), string accessKey = default(string), string clientId = default(string)) { StorageAccount = storageAccount; - AccessKey = accessKey; ContainerName = containerName; BackupName = backupName; + AccessType = accessType; + AccessKey = accessKey; + ClientId = clientId; CustomInit(); } @@ -56,32 +65,48 @@ public ApiManagementServiceBackupRestoreParameters(string storageAccount, string partial void CustomInit(); /// - /// Gets or sets azure Cloud Storage account (used to place/retrieve - /// the backup) name. + /// Gets or sets the name of the Azure storage account (used to + /// place/retrieve the backup). /// [JsonProperty(PropertyName = "storageAccount")] public string StorageAccount { get; set; } /// - /// Gets or sets azure Cloud Storage account (used to place/retrieve - /// the backup) access key. - /// - [JsonProperty(PropertyName = "accessKey")] - public string AccessKey { get; set; } - - /// - /// Gets or sets azure Cloud Storage blob container name used to - /// place/retrieve the backup. + /// Gets or sets the name of the blob container (used to place/retrieve + /// the backup). /// [JsonProperty(PropertyName = "containerName")] public string ContainerName { get; set; } /// - /// Gets or sets the name of the backup file to create. + /// Gets or sets the name of the backup file to create/retrieve. /// [JsonProperty(PropertyName = "backupName")] public string BackupName { get; set; } + /// + /// Gets or sets the type of access to be used for the storage account. + /// Possible values include: 'AccessKey', + /// 'SystemAssignedManagedIdentity', 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "accessType")] + public string AccessType { get; set; } + + /// + /// Gets or sets storage account access key. Required only if + /// `accessType` is set to `AccessKey`. + /// + [JsonProperty(PropertyName = "accessKey")] + public string AccessKey { get; set; } + + /// + /// Gets or sets the Client ID of user assigned managed identity. + /// Required only if `accessType` is set to + /// `UserAssignedManagedIdentity`. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; set; } + /// /// Validate the object. /// @@ -94,10 +119,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccount"); } - if (AccessKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AccessKey"); - } if (ContainerName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "ContainerName"); diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBaseProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBaseProperties.cs index 9c56553e638e..ff123946c951 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBaseProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceBaseProperties.cs @@ -68,6 +68,16 @@ public ApiManagementServiceBaseProperties() /// addresses of the API Management service in Primary region which is /// deployed in an Internal Virtual Network. Available only for Basic, /// Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP + /// address to be associated with Virtual Network deployed service in + /// the region. Supported only for Developer and Premium SKU being + /// deployed in Virtual Network. + /// Whether or not public endpoint + /// access is allowed for this API Management service. Value is + /// optional but if passed in, must be 'Enabled' or 'Disabled'. If + /// 'Disabled', private endpoints are the exclusive access method. + /// Default value is 'Enabled'. Possible values include: 'Enabled', + /// 'Disabled' /// Virtual network /// configuration of the API Management service. /// Additional datacenter locations @@ -134,7 +144,12 @@ public ApiManagementServiceBaseProperties() /// Undelete Api Management Service if it was /// previously soft-deleted. If this flag is specified and set to True /// all other properties will be ignored. - public ApiManagementServiceBaseProperties(string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?)) + /// List of Private Endpoint + /// Connections of this service. + /// Compute Platform Version running the + /// service in this location. Possible values include: 'undetermined', + /// 'stv1', 'stv2', 'mtv1' + public ApiManagementServiceBaseProperties(string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), string publicIpAddressId = default(string), string publicNetworkAccess = default(string), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?), IList privateEndpointConnections = default(IList), string platformVersion = default(string)) { NotificationSenderEmail = notificationSenderEmail; ProvisioningState = provisioningState; @@ -149,6 +164,8 @@ public ApiManagementServiceBaseProperties() HostnameConfigurations = hostnameConfigurations; PublicIPAddresses = publicIPAddresses; PrivateIPAddresses = privateIPAddresses; + PublicIpAddressId = publicIpAddressId; + PublicNetworkAccess = publicNetworkAccess; VirtualNetworkConfiguration = virtualNetworkConfiguration; AdditionalLocations = additionalLocations; CustomProperties = customProperties; @@ -158,6 +175,8 @@ public ApiManagementServiceBaseProperties() VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; Restore = restore; + PrivateEndpointConnections = privateEndpointConnections; + PlatformVersion = platformVersion; CustomInit(); } @@ -257,6 +276,25 @@ public ApiManagementServiceBaseProperties() [JsonProperty(PropertyName = "privateIPAddresses")] public IList PrivateIPAddresses { get; private set; } + /// + /// Gets or sets public Standard SKU IP V4 based IP address to be + /// associated with Virtual Network deployed service in the region. + /// Supported only for Developer and Premium SKU being deployed in + /// Virtual Network. + /// + [JsonProperty(PropertyName = "publicIpAddressId")] + public string PublicIpAddressId { get; set; } + + /// + /// Gets or sets whether or not public endpoint access is allowed for + /// this API Management service. Value is optional but if passed in, + /// must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints + /// are the exclusive access method. Default value is 'Enabled'. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Gets or sets virtual network configuration of the API Management /// service. @@ -367,6 +405,19 @@ public ApiManagementServiceBaseProperties() [JsonProperty(PropertyName = "restore")] public bool? Restore { get; set; } + /// + /// Gets or sets list of Private Endpoint Connections of this service. + /// + [JsonProperty(PropertyName = "privateEndpointConnections")] + public IList PrivateEndpointConnections { get; set; } + + /// + /// Gets compute Platform Version running the service in this location. + /// Possible values include: 'undetermined', 'stv1', 'stv2', 'mtv1' + /// + [JsonProperty(PropertyName = "platformVersion")] + public string PlatformVersion { get; private set; } + /// /// Validate the object. /// @@ -416,6 +467,16 @@ public virtual void Validate() } } } + if (PrivateEndpointConnections != null) + { + foreach (var element3 in PrivateEndpointConnections) + { + if (element3 != null) + { + element3.Validate(); + } + } + } } } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceResource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceResource.cs index 08d4384bb709..840ea8cf5ff4 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceResource.cs @@ -80,6 +80,16 @@ public ApiManagementServiceResource() /// addresses of the API Management service in Primary region which is /// deployed in an Internal Virtual Network. Available only for Basic, /// Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP + /// address to be associated with Virtual Network deployed service in + /// the region. Supported only for Developer and Premium SKU being + /// deployed in Virtual Network. + /// Whether or not public endpoint + /// access is allowed for this API Management service. Value is + /// optional but if passed in, must be 'Enabled' or 'Disabled'. If + /// 'Disabled', private endpoints are the exclusive access method. + /// Default value is 'Enabled'. Possible values include: 'Enabled', + /// 'Disabled' /// Virtual network /// configuration of the API Management service. /// Additional datacenter locations @@ -146,12 +156,19 @@ public ApiManagementServiceResource() /// Undelete Api Management Service if it was /// previously soft-deleted. If this flag is specified and set to True /// all other properties will be ignored. + /// List of Private Endpoint + /// Connections of this service. + /// Compute Platform Version running the + /// service in this location. Possible values include: 'undetermined', + /// 'stv1', 'stv2', 'mtv1' /// Managed service identity of the Api /// Management service. + /// Metadata pertaining to creation and last + /// modification of the resource. /// ETag of the resource. /// A list of availability zones denoting where the /// resource needs to come from. - public ApiManagementServiceResource(string publisherEmail, string publisherName, ApiManagementServiceSkuProperties sku, string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?), ApiManagementServiceIdentity identity = default(ApiManagementServiceIdentity), string etag = default(string), IList zones = default(IList)) + public ApiManagementServiceResource(string publisherEmail, string publisherName, ApiManagementServiceSkuProperties sku, string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), string publicIpAddressId = default(string), string publicNetworkAccess = default(string), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?), IList privateEndpointConnections = default(IList), string platformVersion = default(string), ApiManagementServiceIdentity identity = default(ApiManagementServiceIdentity), SystemData systemData = default(SystemData), string etag = default(string), IList zones = default(IList)) : base(id, name, type, tags) { NotificationSenderEmail = notificationSenderEmail; @@ -167,6 +184,8 @@ public ApiManagementServiceResource() HostnameConfigurations = hostnameConfigurations; PublicIPAddresses = publicIPAddresses; PrivateIPAddresses = privateIPAddresses; + PublicIpAddressId = publicIpAddressId; + PublicNetworkAccess = publicNetworkAccess; VirtualNetworkConfiguration = virtualNetworkConfiguration; AdditionalLocations = additionalLocations; CustomProperties = customProperties; @@ -176,10 +195,13 @@ public ApiManagementServiceResource() VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; Restore = restore; + PrivateEndpointConnections = privateEndpointConnections; + PlatformVersion = platformVersion; PublisherEmail = publisherEmail; PublisherName = publisherName; Sku = sku; Identity = identity; + SystemData = systemData; Location = location; Etag = etag; Zones = zones; @@ -282,6 +304,25 @@ public ApiManagementServiceResource() [JsonProperty(PropertyName = "properties.privateIPAddresses")] public IList PrivateIPAddresses { get; private set; } + /// + /// Gets or sets public Standard SKU IP V4 based IP address to be + /// associated with Virtual Network deployed service in the region. + /// Supported only for Developer and Premium SKU being deployed in + /// Virtual Network. + /// + [JsonProperty(PropertyName = "properties.publicIpAddressId")] + public string PublicIpAddressId { get; set; } + + /// + /// Gets or sets whether or not public endpoint access is allowed for + /// this API Management service. Value is optional but if passed in, + /// must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints + /// are the exclusive access method. Default value is 'Enabled'. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Gets or sets virtual network configuration of the API Management /// service. @@ -392,6 +433,19 @@ public ApiManagementServiceResource() [JsonProperty(PropertyName = "properties.restore")] public bool? Restore { get; set; } + /// + /// Gets or sets list of Private Endpoint Connections of this service. + /// + [JsonProperty(PropertyName = "properties.privateEndpointConnections")] + public IList PrivateEndpointConnections { get; set; } + + /// + /// Gets compute Platform Version running the service in this location. + /// Possible values include: 'undetermined', 'stv1', 'stv2', 'mtv1' + /// + [JsonProperty(PropertyName = "properties.platformVersion")] + public string PlatformVersion { get; private set; } + /// /// Gets or sets publisher email. /// @@ -417,6 +471,13 @@ public ApiManagementServiceResource() [JsonProperty(PropertyName = "identity")] public ApiManagementServiceIdentity Identity { get; set; } + /// + /// Gets metadata pertaining to creation and last modification of the + /// resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Gets or sets resource location. /// @@ -501,6 +562,16 @@ public virtual void Validate() } } } + if (PrivateEndpointConnections != null) + { + foreach (var element3 in PrivateEndpointConnections) + { + if (element3 != null) + { + element3.Validate(); + } + } + } if (PublisherEmail != null) { if (PublisherEmail.Length > 100) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceUpdateParameters.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceUpdateParameters.cs index 47145e4df0a8..a555bad92486 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceUpdateParameters.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiManagementServiceUpdateParameters.cs @@ -75,6 +75,16 @@ public ApiManagementServiceUpdateParameters() /// addresses of the API Management service in Primary region which is /// deployed in an Internal Virtual Network. Available only for Basic, /// Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP + /// address to be associated with Virtual Network deployed service in + /// the region. Supported only for Developer and Premium SKU being + /// deployed in Virtual Network. + /// Whether or not public endpoint + /// access is allowed for this API Management service. Value is + /// optional but if passed in, must be 'Enabled' or 'Disabled'. If + /// 'Disabled', private endpoints are the exclusive access method. + /// Default value is 'Enabled'. Possible values include: 'Enabled', + /// 'Disabled' /// Virtual network /// configuration of the API Management service. /// Additional datacenter locations @@ -141,6 +151,11 @@ public ApiManagementServiceUpdateParameters() /// Undelete Api Management Service if it was /// previously soft-deleted. If this flag is specified and set to True /// all other properties will be ignored. + /// List of Private Endpoint + /// Connections of this service. + /// Compute Platform Version running the + /// service in this location. Possible values include: 'undetermined', + /// 'stv1', 'stv2', 'mtv1' /// Publisher email. /// Publisher name. /// SKU properties of the API Management @@ -148,7 +163,9 @@ public ApiManagementServiceUpdateParameters() /// Managed service identity of the Api /// Management service. /// ETag of the resource. - public ApiManagementServiceUpdateParameters(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?), string publisherEmail = default(string), string publisherName = default(string), ApiManagementServiceSkuProperties sku = default(ApiManagementServiceSkuProperties), ApiManagementServiceIdentity identity = default(ApiManagementServiceIdentity), string etag = default(string)) + /// A list of availability zones denoting where the + /// resource needs to come from. + public ApiManagementServiceUpdateParameters(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string gatewayRegionalUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), string developerPortalUrl = default(string), IList hostnameConfigurations = default(IList), IList publicIPAddresses = default(IList), IList privateIPAddresses = default(IList), string publicIpAddressId = default(string), string publicNetworkAccess = default(string), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), IList certificates = default(IList), bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), string virtualNetworkType = default(string), ApiVersionConstraint apiVersionConstraint = default(ApiVersionConstraint), bool? restore = default(bool?), IList privateEndpointConnections = default(IList), string platformVersion = default(string), string publisherEmail = default(string), string publisherName = default(string), ApiManagementServiceSkuProperties sku = default(ApiManagementServiceSkuProperties), ApiManagementServiceIdentity identity = default(ApiManagementServiceIdentity), string etag = default(string), IList zones = default(IList)) : base(id, name, type, tags) { NotificationSenderEmail = notificationSenderEmail; @@ -164,6 +181,8 @@ public ApiManagementServiceUpdateParameters() HostnameConfigurations = hostnameConfigurations; PublicIPAddresses = publicIPAddresses; PrivateIPAddresses = privateIPAddresses; + PublicIpAddressId = publicIpAddressId; + PublicNetworkAccess = publicNetworkAccess; VirtualNetworkConfiguration = virtualNetworkConfiguration; AdditionalLocations = additionalLocations; CustomProperties = customProperties; @@ -173,11 +192,14 @@ public ApiManagementServiceUpdateParameters() VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; Restore = restore; + PrivateEndpointConnections = privateEndpointConnections; + PlatformVersion = platformVersion; PublisherEmail = publisherEmail; PublisherName = publisherName; Sku = sku; Identity = identity; Etag = etag; + Zones = zones; CustomInit(); } @@ -277,6 +299,25 @@ public ApiManagementServiceUpdateParameters() [JsonProperty(PropertyName = "properties.privateIPAddresses")] public IList PrivateIPAddresses { get; private set; } + /// + /// Gets or sets public Standard SKU IP V4 based IP address to be + /// associated with Virtual Network deployed service in the region. + /// Supported only for Developer and Premium SKU being deployed in + /// Virtual Network. + /// + [JsonProperty(PropertyName = "properties.publicIpAddressId")] + public string PublicIpAddressId { get; set; } + + /// + /// Gets or sets whether or not public endpoint access is allowed for + /// this API Management service. Value is optional but if passed in, + /// must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints + /// are the exclusive access method. Default value is 'Enabled'. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Gets or sets virtual network configuration of the API Management /// service. @@ -387,6 +428,19 @@ public ApiManagementServiceUpdateParameters() [JsonProperty(PropertyName = "properties.restore")] public bool? Restore { get; set; } + /// + /// Gets or sets list of Private Endpoint Connections of this service. + /// + [JsonProperty(PropertyName = "properties.privateEndpointConnections")] + public IList PrivateEndpointConnections { get; set; } + + /// + /// Gets compute Platform Version running the service in this location. + /// Possible values include: 'undetermined', 'stv1', 'stv2', 'mtv1' + /// + [JsonProperty(PropertyName = "properties.platformVersion")] + public string PlatformVersion { get; private set; } + /// /// Gets or sets publisher email. /// @@ -418,6 +472,13 @@ public ApiManagementServiceUpdateParameters() [JsonProperty(PropertyName = "etag")] public string Etag { get; private set; } + /// + /// Gets or sets a list of availability zones denoting where the + /// resource needs to come from. + /// + [JsonProperty(PropertyName = "zones")] + public IList Zones { get; set; } + /// /// Validate the object. /// @@ -467,6 +528,16 @@ public virtual void Validate() } } } + if (PrivateEndpointConnections != null) + { + foreach (var element3 in PrivateEndpointConnections) + { + if (element3 != null) + { + element3.Validate(); + } + } + } if (PublisherEmail != null) { if (PublisherEmail.Length > 100) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiReleaseContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiReleaseContract.cs index 25ac88945611..17e5db885318 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiReleaseContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiReleaseContract.cs @@ -32,10 +32,12 @@ public ApiReleaseContract() /// /// Initializes a new instance of the ApiReleaseContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Identifier of the API the release belongs /// to. /// The time the API was released. The diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs new file mode 100644 index 000000000000..1f0179f8c7a2 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs @@ -0,0 +1,123 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API Schema Contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiSchemaContract : Resource + { + /// + /// Initializes a new instance of the ApiSchemaContract class. + /// + public ApiSchemaContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiSchemaContract class. + /// + /// Must be a valid a media type used in a + /// Content-Type header as defined in the RFC 2616. Media type of the + /// schema document (e.g. application/json, application/xml). + /// </br> - `Swagger` Schema use + /// `application/vnd.ms-azure-apim.swagger.definitions+json` + /// </br> - `WSDL` Schema use + /// `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` + /// Schema use `application/vnd.oai.openapi.components+json` + /// </br> - `WADL Schema` use + /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Json escaped string defining the document + /// representing the Schema. Used for schemas other than + /// Swagger/OpenAPI. + /// Types definitions. Used for + /// Swagger/OpenAPI v1 schemas only, null otherwise. + /// Types definitions. Used for + /// Swagger/OpenAPI v2/v3 schemas only, null otherwise. + public ApiSchemaContract(string contentType, string id = default(string), string name = default(string), string type = default(string), string value = default(string), object definitions = default(object), object components = default(object)) + : base(id, name, type) + { + ContentType = contentType; + Value = value; + Definitions = definitions; + Components = components; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets must be a valid a media type used in a Content-Type + /// header as defined in the RFC 2616. Media type of the schema + /// document (e.g. application/json, application/xml). + /// &lt;/br&gt; - `Swagger` Schema use + /// `application/vnd.ms-azure-apim.swagger.definitions+json` + /// &lt;/br&gt; - `WSDL` Schema use + /// `application/vnd.ms-azure-apim.xsd+xml` &lt;/br&gt; - + /// `OpenApi` Schema use `application/vnd.oai.openapi.components+json` + /// &lt;/br&gt; - `WADL Schema` use + /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// + [JsonProperty(PropertyName = "properties.contentType")] + public string ContentType { get; set; } + + /// + /// Gets or sets json escaped string defining the document representing + /// the Schema. Used for schemas other than Swagger/OpenAPI. + /// + [JsonProperty(PropertyName = "properties.document.value")] + public string Value { get; set; } + + /// + /// Gets or sets types definitions. Used for Swagger/OpenAPI v1 schemas + /// only, null otherwise. + /// + [JsonProperty(PropertyName = "properties.document.definitions")] + public object Definitions { get; set; } + + /// + /// Gets or sets types definitions. Used for Swagger/OpenAPI v2/v3 + /// schemas only, null otherwise. + /// + [JsonProperty(PropertyName = "properties.document.components")] + public object Components { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ContentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiTagResourceContractProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiTagResourceContractProperties.cs index eb956160cc20..7f916cbc7b82 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiTagResourceContractProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiTagResourceContractProperties.cs @@ -41,23 +41,27 @@ public ApiTagResourceContractProperties() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. /// API identifier in the form /apis/{apiId}. /// API name. /// Absolute URL of the backend service @@ -69,8 +73,8 @@ public ApiTagResourceContractProperties() /// API. /// Describes on which protocols the operations /// in this API can be invoked. - public ApiTagResourceContractProperties(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string id = default(string), string name = default(string), string serviceUrl = default(string), string path = default(string), IList protocols = default(IList)) - : base(description, authenticationSettings, subscriptionKeyParameterNames, apiType, apiRevision, apiVersion, isCurrent, isOnline, apiRevisionDescription, apiVersionDescription, apiVersionSetId, subscriptionRequired) + public ApiTagResourceContractProperties(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation), string id = default(string), string name = default(string), string serviceUrl = default(string), string path = default(string), IList protocols = default(IList)) + : base(description, authenticationSettings, subscriptionKeyParameterNames, apiType, apiRevision, apiVersion, isCurrent, isOnline, apiRevisionDescription, apiVersionDescription, apiVersionSetId, subscriptionRequired, termsOfServiceUrl, contact, license) { Id = id; Name = name; @@ -118,7 +122,7 @@ public ApiTagResourceContractProperties() /// API can be invoked. /// [JsonProperty(PropertyName = "protocols")] - public IList Protocols { get; set; } + public IList Protocols { get; set; } /// /// Validate the object. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiType.cs index ec3f85b9d795..8d5f06e3252b 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiType.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiType.cs @@ -18,5 +18,7 @@ public static class ApiType { public const string Http = "http"; public const string Soap = "soap"; + public const string Websocket = "websocket"; + public const string Graphql = "graphql"; } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiUpdateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiUpdateContract.cs index 7701cc20b045..540536ceb0ed 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiUpdateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiUpdateContract.cs @@ -41,23 +41,27 @@ public ApiUpdateContract() /// Protocols over which /// API is made available. /// Type of API. Possible values include: 'http', - /// 'soap' - /// Describes the Revision of the Api. If no + /// 'soap', 'websocket', 'graphql' + /// Describes the revision of the API. If no /// value is provided, default revision 1 is created - /// Indicates the Version identifier of the + /// Indicates the version identifier of the /// API if the API is versioned /// Indicates if API revision is current api /// revision. /// Indicates if API revision is accessible via /// the gateway. - /// Description of the Api + /// Description of the API /// Revision. - /// Description of the Api + /// Description of the API /// Version. /// A resource identifier for the related /// ApiVersionSet. /// Specifies whether an API or /// Product subscription is required for accessing the API. + /// A URL to the Terms of Service for + /// the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. /// API name. /// Absolute URL of the backend service /// implementing this API. @@ -68,7 +72,7 @@ public ApiUpdateContract() /// API. /// Describes on which protocols the operations /// in this API can be invoked. - public ApiUpdateContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string displayName = default(string), string serviceUrl = default(string), string path = default(string), IList protocols = default(IList)) + public ApiUpdateContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), string apiVersion = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = default(string), string apiVersionDescription = default(string), string apiVersionSetId = default(string), bool? subscriptionRequired = default(bool?), string termsOfServiceUrl = default(string), ApiContactInformation contact = default(ApiContactInformation), ApiLicenseInformation license = default(ApiLicenseInformation), string displayName = default(string), string serviceUrl = default(string), string path = default(string), IList protocols = default(IList)) { Description = description; AuthenticationSettings = authenticationSettings; @@ -82,6 +86,9 @@ public ApiUpdateContract() ApiVersionDescription = apiVersionDescription; ApiVersionSetId = apiVersionSetId; SubscriptionRequired = subscriptionRequired; + TermsOfServiceUrl = termsOfServiceUrl; + Contact = contact; + License = license; DisplayName = displayName; ServiceUrl = serviceUrl; Path = path; @@ -115,20 +122,21 @@ public ApiUpdateContract() public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// - /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// Gets or sets type of API. Possible values include: 'http', 'soap', + /// 'websocket', 'graphql' /// [JsonProperty(PropertyName = "properties.type")] public string ApiType { get; set; } /// - /// Gets or sets describes the Revision of the Api. If no value is + /// Gets or sets describes the revision of the API. If no value is /// provided, default revision 1 is created /// [JsonProperty(PropertyName = "properties.apiRevision")] public string ApiRevision { get; set; } /// - /// Gets or sets indicates the Version identifier of the API if the API + /// Gets or sets indicates the version identifier of the API if the API /// is versioned /// [JsonProperty(PropertyName = "properties.apiVersion")] @@ -147,13 +155,13 @@ public ApiUpdateContract() public bool? IsOnline { get; private set; } /// - /// Gets or sets description of the Api Revision. + /// Gets or sets description of the API Revision. /// [JsonProperty(PropertyName = "properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// - /// Gets or sets description of the Api Version. + /// Gets or sets description of the API Version. /// [JsonProperty(PropertyName = "properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } @@ -171,6 +179,25 @@ public ApiUpdateContract() [JsonProperty(PropertyName = "properties.subscriptionRequired")] public bool? SubscriptionRequired { get; set; } + /// + /// Gets or sets A URL to the Terms of Service for the API. MUST be in + /// the format of a URL. + /// + [JsonProperty(PropertyName = "properties.termsOfServiceUrl")] + public string TermsOfServiceUrl { get; set; } + + /// + /// Gets or sets contact information for the API. + /// + [JsonProperty(PropertyName = "properties.contact")] + public ApiContactInformation Contact { get; set; } + + /// + /// Gets or sets license information for the API. + /// + [JsonProperty(PropertyName = "properties.license")] + public ApiLicenseInformation License { get; set; } + /// /// Gets or sets API name. /// @@ -198,7 +225,7 @@ public ApiUpdateContract() /// API can be invoked. /// [JsonProperty(PropertyName = "properties.protocols")] - public IList Protocols { get; set; } + public IList Protocols { get; set; } /// /// Validate the object. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetContract.cs index 9a242f5d3ff6..227139689a33 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetContract.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Version Set Contract details. + /// API Version Set Contract details. /// [Rest.Serialization.JsonTransformation] public partial class ApiVersionSetContract : Resource @@ -36,10 +36,12 @@ public ApiVersionSetContract() /// An value that determines where the /// API Version identifier will be located in a HTTP request. Possible /// values include: 'Segment', 'Query', 'Header' - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of API Version Set. /// Name of query parameter that /// indicates the API Version if versioningScheme is set to diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetEntityBase.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetEntityBase.cs index ae233adb00ad..fd59ab2b0fdf 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetEntityBase.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetEntityBase.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Version set base parameters + /// API Version set base parameters /// public partial class ApiVersionSetEntityBase { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetUpdateParameters.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetUpdateParameters.cs index 127c91590c7e..d14e191fa8b0 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetUpdateParameters.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiVersionSetUpdateParameters.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Parameters to update or create an Api Version Set Contract. + /// Parameters to update or create an API Version Set Contract. /// [Rest.Serialization.JsonTransformation] public partial class ApiVersionSetUpdateParameters diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ArmIdWrapper.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ArmIdWrapper.cs new file mode 100644 index 000000000000..4687ca415797 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ArmIdWrapper.cs @@ -0,0 +1,49 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A wrapper for an ARM resource id + /// + public partial class ArmIdWrapper + { + /// + /// Initializes a new instance of the ArmIdWrapper class. + /// + public ArmIdWrapper() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArmIdWrapper class. + /// + public ArmIdWrapper(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AssociationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AssociationContract.cs index 0b7f5136b29e..ae2703488239 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AssociationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AssociationContract.cs @@ -32,10 +32,12 @@ public AssociationContract() /// /// Initializes a new instance of the AssociationContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Provisioning state. Possible values /// include: 'created' public AssociationContract(string id = default(string), string name = default(string), string type = default(string), ProvisioningState? provisioningState = default(ProvisioningState?)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerContract.cs index f239f764153e..a1da24821546 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerContract.cs @@ -48,10 +48,12 @@ public AuthorizationServerContract() /// client uses to request the access token. /// Client or app id registered with this /// authorization server. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of the authorization server. /// Can contain HTML formatting tags. /// HTTP verbs supported by the diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerUpdateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerUpdateContract.cs index 6ccf6044d68d..aa7d08420fd5 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerUpdateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AuthorizationServerUpdateContract.cs @@ -36,10 +36,12 @@ public AuthorizationServerUpdateContract() /// Initializes a new instance of the AuthorizationServerUpdateContract /// class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of the authorization server. /// Can contain HTML formatting tags. /// HTTP verbs supported by the diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AzureEntityResource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AzureEntityResource.cs new file mode 100644 index 000000000000..c1ab5902b3d3 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/AzureEntityResource.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Entity Resource + /// + /// + /// The resource model definition for an Azure Resource Manager resource + /// with an etag. + /// + public partial class AzureEntityResource : Resource + { + /// + /// Initializes a new instance of the AzureEntityResource class. + /// + public AzureEntityResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureEntityResource class. + /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Resource Etag. + public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type) + { + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource Etag. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendBaseParameters.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendBaseParameters.cs index d10de360a431..cabae888e713 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendBaseParameters.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendBaseParameters.cs @@ -34,7 +34,7 @@ public BackendBaseParameters() /// Backend Description. /// Management Uri of the Resource in External /// System. This url can be the Arm Resource Id of Logic Apps, Function - /// Apps or Api Apps. + /// Apps or API Apps. /// Backend Properties contract /// Backend Credentials Contract /// Properties @@ -72,7 +72,7 @@ public BackendBaseParameters() /// /// Gets or sets management Uri of the Resource in External System. /// This url can be the Arm Resource Id of Logic Apps, Function Apps or - /// Api Apps. + /// API Apps. /// [JsonProperty(PropertyName = "resourceId")] public string ResourceId { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendContract.cs index 3662dbc92827..673926ad2f02 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendContract.cs @@ -35,15 +35,17 @@ public BackendContract() /// Runtime Url of the Backend. /// Backend communication protocol. Possible /// values include: 'http', 'soap' - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Backend Title. /// Backend Description. /// Management Uri of the Resource in External /// System. This url can be the Arm Resource Id of Logic Apps, Function - /// Apps or Api Apps. + /// Apps or API Apps. /// Backend Properties contract /// Backend Credentials Contract /// Properties @@ -84,7 +86,7 @@ public BackendContract() /// /// Gets or sets management Uri of the Resource in External System. /// This url can be the Arm Resource Id of Logic Apps, Function Apps or - /// Api Apps. + /// API Apps. /// [JsonProperty(PropertyName = "properties.resourceId")] public string ResourceId { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendReconnectContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendReconnectContract.cs index f0421e2790bc..059e19518071 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendReconnectContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendReconnectContract.cs @@ -32,10 +32,12 @@ public BackendReconnectContract() /// /// Initializes a new instance of the BackendReconnectContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Duration in ISO8601 format after which /// reconnect will be initiated. Minimum duration of the Reconnect is /// PT2M. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendUpdateParameters.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendUpdateParameters.cs index 10414d288d8b..99eb58fe6668 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendUpdateParameters.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BackendUpdateParameters.cs @@ -36,7 +36,7 @@ public BackendUpdateParameters() /// Backend Description. /// Management Uri of the Resource in External /// System. This url can be the Arm Resource Id of Logic Apps, Function - /// Apps or Api Apps. + /// Apps or API Apps. /// Backend Properties contract /// Backend Credentials Contract /// Properties @@ -79,7 +79,7 @@ public BackendUpdateParameters() /// /// Gets or sets management Uri of the Resource in External System. /// This url can be the Arm Resource Id of Logic Apps, Function Apps or - /// Api Apps. + /// API Apps. /// [JsonProperty(PropertyName = "properties.resourceId")] public string ResourceId { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CacheContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CacheContract.cs index 240a67f6fa9c..cfb628ee49a6 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CacheContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CacheContract.cs @@ -37,10 +37,12 @@ public CacheContract() /// Location identifier to use cache from /// (should be either 'default' or valid Azure region /// identifier) - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Cache description /// Original uri of entity in external system /// cache points to diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateContract.cs index 508ecccab23f..64e26e34eeac 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateContract.cs @@ -38,10 +38,12 @@ public CertificateContract() /// The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` /// as specified by the ISO 8601 standard. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// KeyVault location details of the /// certificate. public CertificateContract(string subject, string thumbprint, System.DateTime expirationDate, string id = default(string), string name = default(string), string type = default(string), KeyVaultContractProperties keyVault = default(KeyVaultContractProperties)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateSource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateSource.cs new file mode 100644 index 000000000000..3e582f6772c4 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateSource.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for CertificateSource. + /// + public static class CertificateSource + { + public const string Managed = "Managed"; + public const string KeyVault = "KeyVault"; + public const string Custom = "Custom"; + public const string BuiltIn = "BuiltIn"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateStatus.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateStatus.cs new file mode 100644 index 000000000000..499020643c7b --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CertificateStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for CertificateStatus. + /// + public static class CertificateStatus + { + public const string Completed = "Completed"; + public const string Failed = "Failed"; + public const string InProgress = "InProgress"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectionStatus.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectionStatus.cs new file mode 100644 index 000000000000..68148ef94627 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectionStatus.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for ConnectionStatus. + /// + public static class ConnectionStatus + { + public const string Unknown = "Unknown"; + public const string Connected = "Connected"; + public const string Disconnected = "Disconnected"; + public const string Degraded = "Degraded"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckProtocol.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckProtocol.cs new file mode 100644 index 000000000000..108d32646045 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckProtocol.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for ConnectivityCheckProtocol. + /// + public static class ConnectivityCheckProtocol + { + public const string TCP = "TCP"; + public const string HTTP = "HTTP"; + public const string HTTPS = "HTTPS"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequest.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequest.cs new file mode 100644 index 000000000000..592eadde6535 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequest.cs @@ -0,0 +1,121 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A request to perform the connectivity check operation on a API + /// Management service. + /// + public partial class ConnectivityCheckRequest + { + /// + /// Initializes a new instance of the ConnectivityCheckRequest class. + /// + public ConnectivityCheckRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityCheckRequest class. + /// + /// Definitions about the connectivity check + /// origin. + /// The connectivity check operation + /// destination. + /// The IP version to be used. Only + /// IPv4 is supported for now. Possible values include: 'IPv4' + /// The request's protocol. Specific protocol + /// configuration can be available based on this selection. The + /// specified destination address must be coherent with this value. + /// Possible values include: 'TCP', 'HTTP', 'HTTPS' + /// Protocol-specific + /// configuration. + public ConnectivityCheckRequest(ConnectivityCheckRequestSource source, ConnectivityCheckRequestDestination destination, string preferredIPVersion = default(string), string protocol = default(string), ConnectivityCheckRequestProtocolConfiguration protocolConfiguration = default(ConnectivityCheckRequestProtocolConfiguration)) + { + Source = source; + Destination = destination; + PreferredIPVersion = preferredIPVersion; + Protocol = protocol; + ProtocolConfiguration = protocolConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets definitions about the connectivity check origin. + /// + [JsonProperty(PropertyName = "source")] + public ConnectivityCheckRequestSource Source { get; set; } + + /// + /// Gets or sets the connectivity check operation destination. + /// + [JsonProperty(PropertyName = "destination")] + public ConnectivityCheckRequestDestination Destination { get; set; } + + /// + /// Gets or sets the IP version to be used. Only IPv4 is supported for + /// now. Possible values include: 'IPv4' + /// + [JsonProperty(PropertyName = "preferredIPVersion")] + public string PreferredIPVersion { get; set; } + + /// + /// Gets or sets the request's protocol. Specific protocol + /// configuration can be available based on this selection. The + /// specified destination address must be coherent with this value. + /// Possible values include: 'TCP', 'HTTP', 'HTTPS' + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or sets protocol-specific configuration. + /// + [JsonProperty(PropertyName = "protocolConfiguration")] + public ConnectivityCheckRequestProtocolConfiguration ProtocolConfiguration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Source == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Source"); + } + if (Destination == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Destination"); + } + if (Source != null) + { + Source.Validate(); + } + if (Destination != null) + { + Destination.Validate(); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs new file mode 100644 index 000000000000..53a12d1843bd --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The connectivity check operation destination. + /// + public partial class ConnectivityCheckRequestDestination + { + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestDestination class. + /// + public ConnectivityCheckRequestDestination() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestDestination class. + /// + /// Destination address. Can either be an IP + /// address or a FQDN. + /// Destination port. + public ConnectivityCheckRequestDestination(string address, long port) + { + Address = address; + Port = port; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets destination address. Can either be an IP address or a + /// FQDN. + /// + [JsonProperty(PropertyName = "address")] + public string Address { get; set; } + + /// + /// Gets or sets destination port. + /// + [JsonProperty(PropertyName = "port")] + public long Port { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Address == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Address"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs new file mode 100644 index 000000000000..78f5f4f4707d --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protocol-specific configuration. + /// + public partial class ConnectivityCheckRequestProtocolConfiguration + { + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestProtocolConfiguration class. + /// + public ConnectivityCheckRequestProtocolConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestProtocolConfiguration class. + /// + /// Configuration for HTTP or HTTPS + /// requests. + public ConnectivityCheckRequestProtocolConfiguration(ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration hTTPConfiguration = default(ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration)) + { + HTTPConfiguration = hTTPConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets configuration for HTTP or HTTPS requests. + /// + [JsonProperty(PropertyName = "HTTPConfiguration")] + public ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration HTTPConfiguration { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.cs new file mode 100644 index 000000000000..1b3c9ac4ab89 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Configuration for HTTP or HTTPS requests. + /// + public partial class ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + { + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + /// class. + /// + public ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + /// class. + /// + /// The HTTP method to be used. Possible values + /// include: 'GET', 'POST' + /// List of HTTP status codes considered + /// valid for the request response. + /// List of headers to be included in the + /// request. + public ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration(string method = default(string), IList validStatusCodes = default(IList), IList headers = default(IList)) + { + Method = method; + ValidStatusCodes = validStatusCodes; + Headers = headers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the HTTP method to be used. Possible values include: + /// 'GET', 'POST' + /// + [JsonProperty(PropertyName = "method")] + public string Method { get; set; } + + /// + /// Gets or sets list of HTTP status codes considered valid for the + /// request response. + /// + [JsonProperty(PropertyName = "validStatusCodes")] + public IList ValidStatusCodes { get; set; } + + /// + /// Gets or sets list of headers to be included in the request. + /// + [JsonProperty(PropertyName = "headers")] + public IList Headers { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs new file mode 100644 index 000000000000..08fa42e86f72 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definitions about the connectivity check origin. + /// + public partial class ConnectivityCheckRequestSource + { + /// + /// Initializes a new instance of the ConnectivityCheckRequestSource + /// class. + /// + public ConnectivityCheckRequestSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityCheckRequestSource + /// class. + /// + /// The API Management service region from where + /// to start the connectivity check operation. + /// The particular VMSS instance from which to + /// fire the request. + public ConnectivityCheckRequestSource(string region, long? instance = default(long?)) + { + Region = region; + Instance = instance; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the API Management service region from where to start + /// the connectivity check operation. + /// + [JsonProperty(PropertyName = "region")] + public string Region { get; set; } + + /// + /// Gets or sets the particular VMSS instance from which to fire the + /// request. + /// + [JsonProperty(PropertyName = "instance")] + public long? Instance { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Region == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Region"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckResponse.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckResponse.cs new file mode 100644 index 000000000000..7dc0beec39cd --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityCheckResponse.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information on the connectivity status. + /// + public partial class ConnectivityCheckResponse + { + /// + /// Initializes a new instance of the ConnectivityCheckResponse class. + /// + public ConnectivityCheckResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityCheckResponse class. + /// + /// List of hops between the source and the + /// destination. + /// The connection status. Possible + /// values include: 'Unknown', 'Connected', 'Disconnected', + /// 'Degraded' + /// Average latency in + /// milliseconds. + /// Minimum latency in + /// milliseconds. + /// Maximum latency in + /// milliseconds. + /// Total number of probes sent. + /// Number of failed probes. + public ConnectivityCheckResponse(IList hops = default(IList), string connectionStatus = default(string), long? avgLatencyInMs = default(long?), long? minLatencyInMs = default(long?), long? maxLatencyInMs = default(long?), long? probesSent = default(long?), long? probesFailed = default(long?)) + { + Hops = hops; + ConnectionStatus = connectionStatus; + AvgLatencyInMs = avgLatencyInMs; + MinLatencyInMs = minLatencyInMs; + MaxLatencyInMs = maxLatencyInMs; + ProbesSent = probesSent; + ProbesFailed = probesFailed; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets list of hops between the source and the destination. + /// + [JsonProperty(PropertyName = "hops")] + public IList Hops { get; private set; } + + /// + /// Gets the connection status. Possible values include: 'Unknown', + /// 'Connected', 'Disconnected', 'Degraded' + /// + [JsonProperty(PropertyName = "connectionStatus")] + public string ConnectionStatus { get; private set; } + + /// + /// Gets average latency in milliseconds. + /// + [JsonProperty(PropertyName = "avgLatencyInMs")] + public long? AvgLatencyInMs { get; private set; } + + /// + /// Gets minimum latency in milliseconds. + /// + [JsonProperty(PropertyName = "minLatencyInMs")] + public long? MinLatencyInMs { get; private set; } + + /// + /// Gets maximum latency in milliseconds. + /// + [JsonProperty(PropertyName = "maxLatencyInMs")] + public long? MaxLatencyInMs { get; private set; } + + /// + /// Gets total number of probes sent. + /// + [JsonProperty(PropertyName = "probesSent")] + public long? ProbesSent { get; private set; } + + /// + /// Gets number of failed probes. + /// + [JsonProperty(PropertyName = "probesFailed")] + public long? ProbesFailed { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityHop.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityHop.cs new file mode 100644 index 000000000000..c00480516ebe --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityHop.cs @@ -0,0 +1,94 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information about a hop between the source and the destination. + /// + public partial class ConnectivityHop + { + /// + /// Initializes a new instance of the ConnectivityHop class. + /// + public ConnectivityHop() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityHop class. + /// + /// The type of the hop. + /// The ID of the hop. + /// The IP address of the hop. + /// The ID of the resource corresponding to + /// this hop. + /// List of next hop identifiers. + /// List of issues. + public ConnectivityHop(string type = default(string), string id = default(string), string address = default(string), string resourceId = default(string), IList nextHopIds = default(IList), IList issues = default(IList)) + { + Type = type; + Id = id; + Address = address; + ResourceId = resourceId; + NextHopIds = nextHopIds; + Issues = issues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the type of the hop. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the ID of the hop. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the IP address of the hop. + /// + [JsonProperty(PropertyName = "address")] + public string Address { get; private set; } + + /// + /// Gets the ID of the resource corresponding to this hop. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; private set; } + + /// + /// Gets list of next hop identifiers. + /// + [JsonProperty(PropertyName = "nextHopIds")] + public IList NextHopIds { get; private set; } + + /// + /// Gets list of issues. + /// + [JsonProperty(PropertyName = "issues")] + public IList Issues { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityIssue.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityIssue.cs new file mode 100644 index 000000000000..546dcc439923 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ConnectivityIssue.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information about an issue encountered in the process of checking for + /// connectivity. + /// + public partial class ConnectivityIssue + { + /// + /// Initializes a new instance of the ConnectivityIssue class. + /// + public ConnectivityIssue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityIssue class. + /// + /// The origin of the issue. Possible values + /// include: 'Local', 'Inbound', 'Outbound' + /// The severity of the issue. Possible values + /// include: 'Error', 'Warning' + /// The type of issue. Possible values include: + /// 'Unknown', 'AgentStopped', 'GuestFirewall', 'DnsResolution', + /// 'SocketBind', 'NetworkSecurityRule', 'UserDefinedRoute', + /// 'PortThrottled', 'Platform' + /// Provides additional context on the + /// issue. + public ConnectivityIssue(string origin = default(string), string severity = default(string), string type = default(string), IList> context = default(IList>)) + { + Origin = origin; + Severity = severity; + Type = type; + Context = context; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the origin of the issue. Possible values include: 'Local', + /// 'Inbound', 'Outbound' + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; private set; } + + /// + /// Gets the severity of the issue. Possible values include: 'Error', + /// 'Warning' + /// + [JsonProperty(PropertyName = "severity")] + public string Severity { get; private set; } + + /// + /// Gets the type of issue. Possible values include: 'Unknown', + /// 'AgentStopped', 'GuestFirewall', 'DnsResolution', 'SocketBind', + /// 'NetworkSecurityRule', 'UserDefinedRoute', 'PortThrottled', + /// 'Platform' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets provides additional context on the issue. + /// + [JsonProperty(PropertyName = "context")] + public IList> Context { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentFormat.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentFormat.cs index 12f48c4c9ba7..5943bbdaa334 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentFormat.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentFormat.cs @@ -64,5 +64,10 @@ public static class ContentFormat /// internet address. /// public const string OpenapijsonLink = "openapi+json-link"; + /// + /// The GraphQL API endpoint hosted on a publicly accessible internet + /// address. + /// + public const string GraphqlLink = "graphql-link"; } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentItemContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentItemContract.cs index 406c2081442d..ee7fb10afb68 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentItemContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentItemContract.cs @@ -31,10 +31,12 @@ public ContentItemContract() /// /// Initializes a new instance of the ContentItemContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Properties of the content item. public ContentItemContract(string id = default(string), string name = default(string), string type = default(string), IDictionary properties = default(IDictionary)) : base(id, name, type) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentTypeContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentTypeContract.cs index 5ed97c533082..c4b6e28c4c83 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentTypeContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ContentTypeContract.cs @@ -32,10 +32,12 @@ public ContentTypeContract() /// /// Initializes a new instance of the ContentTypeContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Content type identifier /// Content type name. Must be 1 /// to 250 characters long. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CreatedByType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CreatedByType.cs new file mode 100644 index 000000000000..23503011f7ed --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for CreatedByType. + /// + public static class CreatedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DeletedServiceContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DeletedServiceContract.cs index 923423de0aa1..79c1f498ab5e 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DeletedServiceContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DeletedServiceContract.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Deleted Api Management Service information. + /// Deleted API Management Service information. /// [Rest.Serialization.JsonTransformation] public partial class DeletedServiceContract : Resource @@ -32,10 +32,12 @@ public DeletedServiceContract() /// /// Initializes a new instance of the DeletedServiceContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Fully-qualified API Management Service /// Resource ID /// UTC Date and Time when the service @@ -45,7 +47,7 @@ public DeletedServiceContract() /// UTC Timestamp when the service was /// soft-deleted. The date conforms to the following format: /// yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - /// Api Management Service Master + /// API Management Service Master /// Location. public DeletedServiceContract(string id = default(string), string name = default(string), string type = default(string), string serviceId = default(string), System.DateTime? scheduledPurgeDate = default(System.DateTime?), System.DateTime? deletionDate = default(System.DateTime?), string location = default(string)) : base(id, name, type) @@ -85,7 +87,7 @@ public DeletedServiceContract() public System.DateTime? DeletionDate { get; set; } /// - /// Gets api Management Service Master Location. + /// Gets API Management Service Master Location. /// [JsonProperty(PropertyName = "location")] public string Location { get; private set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DiagnosticContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DiagnosticContract.cs index 33fd0fe0b237..1c914d5ebdcc 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DiagnosticContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/DiagnosticContract.cs @@ -33,10 +33,12 @@ public DiagnosticContract() /// Initializes a new instance of the DiagnosticContract class. /// /// Resource Id of a target logger. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Specifies for what type of messages /// sampling settings should not apply. Possible values include: /// 'allErrors' diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EmailTemplateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EmailTemplateContract.cs index 6ba6bb8c0a51..9bbbdb9d539c 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EmailTemplateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EmailTemplateContract.cs @@ -37,15 +37,17 @@ public EmailTemplateContract() /// Subject of the Template. /// Email Template Body. This should be a valid /// XDocument - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Title of the Template. /// Description of the Email /// Template. /// Whether the template is the default - /// template provided by Api Management or has been edited. + /// template provided by API Management or has been edited. /// Email Template Parameter values. public EmailTemplateContract(string subject, string body, string id = default(string), string name = default(string), string type = default(string), string title = default(string), string description = default(string), bool? isDefault = default(bool?), IList parameters = default(IList)) : base(id, name, type) @@ -89,7 +91,7 @@ public EmailTemplateContract() public string Description { get; set; } /// - /// Gets whether the template is the default template provided by Api + /// Gets whether the template is the default template provided by API /// Management or has been edited. /// [JsonProperty(PropertyName = "properties.isDefault")] diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDependency.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDependency.cs new file mode 100644 index 000000000000..d9506a19b8b4 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDependency.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A domain name that a service is reached at. + /// + public partial class EndpointDependency + { + /// + /// Initializes a new instance of the EndpointDependency class. + /// + public EndpointDependency() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EndpointDependency class. + /// + /// The domain name of the dependency. + /// The Ports used when connecting to + /// DomainName. + public EndpointDependency(string domainName = default(string), IList endpointDetails = default(IList)) + { + DomainName = domainName; + EndpointDetails = endpointDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the domain name of the dependency. + /// + [JsonProperty(PropertyName = "domainName")] + public string DomainName { get; set; } + + /// + /// Gets or sets the Ports used when connecting to DomainName. + /// + [JsonProperty(PropertyName = "endpointDetails")] + public IList EndpointDetails { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDetail.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDetail.cs new file mode 100644 index 000000000000..016320b677c3 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/EndpointDetail.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Current TCP connectivity information from the Api Management Service to + /// a single endpoint. + /// + public partial class EndpointDetail + { + /// + /// Initializes a new instance of the EndpointDetail class. + /// + public EndpointDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EndpointDetail class. + /// + /// The port an endpoint is connected to. + /// The region of the dependency. + public EndpointDetail(int? port = default(int?), string region = default(string)) + { + Port = port; + Region = region; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the port an endpoint is connected to. + /// + [JsonProperty(PropertyName = "port")] + public int? Port { get; set; } + + /// + /// Gets or sets the region of the dependency. + /// + [JsonProperty(PropertyName = "region")] + public string Region { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ExportResultFormat.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ExportResultFormat.cs index f26777e685bb..40a47c233fa1 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ExportResultFormat.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ExportResultFormat.cs @@ -17,21 +17,21 @@ namespace Microsoft.Azure.Management.ApiManagement.Models public static class ExportResultFormat { /// - /// The Api Definition is exported in OpenApi Specification 2.0 format + /// The API Definition is exported in OpenAPI Specification 2.0 format /// to the Storage Blob. /// public const string Swagger = "swagger-link-json"; /// - /// The Api Definition is exported in WSDL Schema to Storage Blob. This + /// The API Definition is exported in WSDL Schema to Storage Blob. This /// is only supported for APIs of Type `soap` /// public const string Wsdl = "wsdl-link+xml"; /// - /// Export the Api Definition in WADL Schema to Storage Blob. + /// Export the API Definition in WADL Schema to Storage Blob. /// public const string Wadl = "wadl-link-json"; /// - /// Export the Api Definition in OpenApi Specification 3.0 to Storage + /// Export the API Definition in OpenAPI Specification 3.0 to Storage /// Blob. /// public const string OpenApi = "openapi-link"; diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityContract.cs index 98ab28d50529..084c7f0f7bad 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityContract.cs @@ -34,10 +34,12 @@ public GatewayCertificateAuthorityContract() /// Initializes a new instance of the /// GatewayCertificateAuthorityContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Determines whether certificate authority is /// trusted. public GatewayCertificateAuthorityContract(string id = default(string), string name = default(string), string type = default(string), bool? isTrusted = default(bool?)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayContract.cs index 62a7f552a44b..6035aae566eb 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayContract.cs @@ -32,10 +32,12 @@ public GatewayContract() /// /// Initializes a new instance of the GatewayContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Gateway location. /// Gateway description public GatewayContract(string id = default(string), string name = default(string), string type = default(string), ResourceLocationDataContract locationData = default(ResourceLocationDataContract), string description = default(string)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationContract.cs index 7add2302780f..c7d4c6ad0655 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationContract.cs @@ -34,10 +34,12 @@ public GatewayHostnameConfigurationContract() /// Initializes a new instance of the /// GatewayHostnameConfigurationContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Hostname value. Supports valid domain name, /// partial or full wildcard /// Identifier of Certificate entity that diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GroupContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GroupContract.cs index e17fe5e13ffb..c76530acd04a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GroupContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GroupContract.cs @@ -33,10 +33,12 @@ public GroupContract() /// Initializes a new instance of the GroupContract class. /// /// Group name. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Group description. Can contain HTML /// formatting tags. /// true if the group is one of the three system diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HTTPHeader.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HTTPHeader.cs new file mode 100644 index 000000000000..82595e62144a --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HTTPHeader.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HTTP header and it's value. + /// + public partial class HTTPHeader + { + /// + /// Initializes a new instance of the HTTPHeader class. + /// + public HTTPHeader() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HTTPHeader class. + /// + /// Header name. + /// Header value. + public HTTPHeader(string name, string value) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets header name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets header value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HostnameConfiguration.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HostnameConfiguration.cs index e59d20fe3ab6..60b910374f2b 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HostnameConfiguration.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/HostnameConfiguration.cs @@ -56,7 +56,11 @@ public HostnameConfiguration() /// negotiate client certificate on the hostname. Default Value is /// false. /// Certificate information. - public HostnameConfiguration(string type, string hostName, string keyVaultId = default(string), string identityClientId = default(string), string encodedCertificate = default(string), string certificatePassword = default(string), bool? defaultSslBinding = default(bool?), bool? negotiateClientCertificate = default(bool?), CertificateInformation certificate = default(CertificateInformation)) + /// Certificate Source. Possible values + /// include: 'Managed', 'KeyVault', 'Custom', 'BuiltIn' + /// Certificate Status. Possible values + /// include: 'Completed', 'Failed', 'InProgress' + public HostnameConfiguration(string type, string hostName, string keyVaultId = default(string), string identityClientId = default(string), string encodedCertificate = default(string), string certificatePassword = default(string), bool? defaultSslBinding = default(bool?), bool? negotiateClientCertificate = default(bool?), CertificateInformation certificate = default(CertificateInformation), string certificateSource = default(string), string certificateStatus = default(string)) { Type = type; HostName = hostName; @@ -67,6 +71,8 @@ public HostnameConfiguration() DefaultSslBinding = defaultSslBinding; NegotiateClientCertificate = negotiateClientCertificate; Certificate = certificate; + CertificateSource = certificateSource; + CertificateStatus = certificateStatus; CustomInit(); } @@ -142,6 +148,20 @@ public HostnameConfiguration() [JsonProperty(PropertyName = "certificate")] public CertificateInformation Certificate { get; set; } + /// + /// Gets or sets certificate Source. Possible values include: + /// 'Managed', 'KeyVault', 'Custom', 'BuiltIn' + /// + [JsonProperty(PropertyName = "certificateSource")] + public string CertificateSource { get; set; } + + /// + /// Gets or sets certificate Status. Possible values include: + /// 'Completed', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "certificateStatus")] + public string CertificateStatus { get; set; } + /// /// Validate the object. /// diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderContract.cs index 8adc8501aed4..cd2bc5c33c20 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderContract.cs @@ -37,10 +37,12 @@ public IdentityProviderContract() /// Client Id of the Application in the external /// Identity Provider. It is App ID for Facebook login, Client ID for /// Google login, App ID for Microsoft. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Identity Provider Type /// identifier. Possible values include: 'facebook', 'google', /// 'microsoft', 'twitter', 'aad', 'aadB2C' diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderCreateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderCreateContract.cs index 521ca44c16c4..41f4a7d3315f 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderCreateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IdentityProviderCreateContract.cs @@ -45,10 +45,12 @@ public IdentityProviderCreateContract() /// login, Public Key for Microsoft. This property will not be filled /// on 'GET' operations! Use '/listSecrets' POST request to get the /// value. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Identity Provider /// Type identifier. Possible values include: 'facebook', 'google', /// 'microsoft', 'twitter', 'aad', 'aadB2C' diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueAttachmentContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueAttachmentContract.cs index bc661097459e..e540843f8697 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueAttachmentContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueAttachmentContract.cs @@ -39,10 +39,12 @@ public IssueAttachmentContract() /// provided in the 'content' property. /// An HTTP link or Base64-encoded binary /// data. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" public IssueAttachmentContract(string title, string contentFormat, string content, string id = default(string), string name = default(string), string type = default(string)) : base(id, name, type) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueCommentContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueCommentContract.cs index 1361c97e8141..9a40a7011385 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueCommentContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueCommentContract.cs @@ -35,10 +35,12 @@ public IssueCommentContract() /// Comment text. /// A resource identifier for the user who left /// the comment. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Date and time when the comment was /// created. public IssueCommentContract(string text, string userId, string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdDate = default(System.DateTime?)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueContract.cs index b809338385f3..dfccda52e433 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueContract.cs @@ -36,10 +36,12 @@ public IssueContract() /// Text describing the issue. /// A resource identifier for the user created the /// issue. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Date and time when the issue was /// created. /// Status of the issue. Possible values include: diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueType.cs new file mode 100644 index 000000000000..fed59b184c60 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/IssueType.cs @@ -0,0 +1,29 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for IssueType. + /// + public static class IssueType + { + public const string Unknown = "Unknown"; + public const string AgentStopped = "AgentStopped"; + public const string GuestFirewall = "GuestFirewall"; + public const string DnsResolution = "DnsResolution"; + public const string SocketBind = "SocketBind"; + public const string NetworkSecurityRule = "NetworkSecurityRule"; + public const string UserDefinedRoute = "UserDefinedRoute"; + public const string PortThrottled = "PortThrottled"; + public const string Platform = "Platform"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs index fdbe073ca243..a93de81cfc12 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs @@ -33,7 +33,7 @@ public KeyVaultContractCreateProperties() /// /// Key vault secret identifier for /// fetching secret. Providing a versioned secret will prevent - /// auto-refresh. This requires Api Management service to be configured + /// auto-refresh. This requires API Management service to be configured /// with aka.ms/apimmsi /// SystemAssignedIdentity or /// UserAssignedIdentity Client Id which will be used to access key @@ -53,7 +53,7 @@ public KeyVaultContractCreateProperties() /// /// Gets or sets key vault secret identifier for fetching secret. /// Providing a versioned secret will prevent auto-refresh. This - /// requires Api Management service to be configured with + /// requires API Management service to be configured with /// aka.ms/apimmsi /// [JsonProperty(PropertyName = "secretIdentifier")] diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs index af91d8a0f22b..ffdefe3b070e 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs @@ -31,7 +31,7 @@ public KeyVaultContractProperties() /// /// Key vault secret identifier for /// fetching secret. Providing a versioned secret will prevent - /// auto-refresh. This requires Api Management service to be configured + /// auto-refresh. This requires API Management service to be configured /// with aka.ms/apimmsi /// SystemAssignedIdentity or /// UserAssignedIdentity Client Id which will be used to access key diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/LoggerContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/LoggerContract.cs index 8c832edbe786..63ea52962f78 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/LoggerContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/LoggerContract.cs @@ -36,10 +36,12 @@ public LoggerContract() /// /// Logger type. Possible values include: /// 'azureEventHub', 'applicationInsights', 'azureMonitor' - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Logger description. /// The name and SendRule connection string /// of the event hub for azureEventHub logger. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Method.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Method.cs new file mode 100644 index 000000000000..f361540f3681 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Method.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for Method. + /// + public static class Method + { + public const string GET = "GET"; + public const string POST = "POST"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueContract.cs index 84aa9442a284..87acc055a736 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueContract.cs @@ -37,10 +37,12 @@ public NamedValueContract() /// Unique name of NamedValue. It may contain /// only letters, digits, period, dash, and underscore /// characters. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Optional tags that when provided can be used to /// filter the NamedValue list. /// Determines whether the value is a secret and diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueCreateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueCreateContract.cs index e22c6af38dc3..ae74c7401100 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueCreateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NamedValueCreateContract.cs @@ -37,10 +37,12 @@ public NamedValueCreateContract() /// Unique name of NamedValue. It may contain /// only letters, digits, period, dash, and underscore /// characters. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Optional tags that when provided can be used to /// filter the NamedValue list. /// Determines whether the value is a secret and diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NotificationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NotificationContract.cs index 49a6d346fe0f..6f62bbee91a8 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NotificationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/NotificationContract.cs @@ -33,10 +33,12 @@ public NotificationContract() /// Initializes a new instance of the NotificationContract class. /// /// Title of the Notification. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of the Notification. /// Recipient Parameter values. public NotificationContract(string title, string id = default(string), string name = default(string), string type = default(string), string description = default(string), RecipientsContractProperties recipients = default(RecipientsContractProperties)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OpenidConnectProviderContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OpenidConnectProviderContract.cs index 968d453142bc..2a914cd006ca 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OpenidConnectProviderContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OpenidConnectProviderContract.cs @@ -39,10 +39,12 @@ public OpenidConnectProviderContract() /// Metadata endpoint URI. /// Client ID of developer console which is the /// client application. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// User-friendly description of OpenID /// Connect Provider. /// Client Secret of developer console which diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationContract.cs index 0855e59a3755..f3ae8d36c5e6 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationContract.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Operation details. + /// API Operation details. /// [Rest.Serialization.JsonTransformation] public partial class OperationContract : Resource @@ -40,10 +40,12 @@ public OperationContract() /// Relative URL template identifying the /// target resource for this operation. May include parameters. /// Example: /customers/{cid}/orders/{oid}/?date={date} - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Collection of URL template /// parameters. /// Description of the operation. May include diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationEntityBaseContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationEntityBaseContract.cs index ab95926fea77..936877fe071a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationEntityBaseContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationEntityBaseContract.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Operation Entity Base Contract details. + /// API Operation Entity Base Contract details. /// public partial class OperationEntityBaseContract { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationResultContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationResultContract.cs index 63841f5c06f0..df61b8d4983a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationResultContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationResultContract.cs @@ -34,10 +34,12 @@ public OperationResultContract() /// /// Initializes a new instance of the OperationResultContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Operation result /// identifier. /// Status of an async operation. Possible values diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationTagResourceContractProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationTagResourceContractProperties.cs index b056dedafdfe..b05c1058411a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationTagResourceContractProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationTagResourceContractProperties.cs @@ -34,9 +34,9 @@ public OperationTagResourceContractProperties() /// Identifier of the operation in form /// /operations/{operationId}. /// Operation name. - /// Api Name. - /// Api Revision. - /// Api Version. + /// API Name. + /// API Revision. + /// API Version. /// Operation Description. /// A Valid HTTP Operation Method. Typical Http /// Methods like GET, PUT, POST but not limited by only them. @@ -75,19 +75,19 @@ public OperationTagResourceContractProperties() public string Name { get; private set; } /// - /// Gets api Name. + /// Gets API Name. /// [JsonProperty(PropertyName = "apiName")] public string ApiName { get; private set; } /// - /// Gets api Revision. + /// Gets API Revision. /// [JsonProperty(PropertyName = "apiRevision")] public string ApiRevision { get; private set; } /// - /// Gets api Version. + /// Gets API Version. /// [JsonProperty(PropertyName = "apiVersion")] public string ApiVersion { get; private set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationUpdateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationUpdateContract.cs index 36308b97b2a8..5c475efee744 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationUpdateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OperationUpdateContract.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Api Operation Update Contract details. + /// API Operation Update Contract details. /// [Rest.Serialization.JsonTransformation] public partial class OperationUpdateContract diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Origin.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Origin.cs new file mode 100644 index 000000000000..76e0c94f6980 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Origin.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for Origin. + /// + public static class Origin + { + public const string Local = "Local"; + public const string Inbound = "Inbound"; + public const string Outbound = "Outbound"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs new file mode 100644 index 000000000000..8ec208d97cee --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Endpoints accessed for a common purpose that the Api Management Service + /// requires outbound network access to. + /// + public partial class OutboundEnvironmentEndpoint + { + /// + /// Initializes a new instance of the OutboundEnvironmentEndpoint + /// class. + /// + public OutboundEnvironmentEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OutboundEnvironmentEndpoint + /// class. + /// + /// The type of service accessed by the Api + /// Management Service, e.g., Azure Storage, Azure SQL Database, and + /// Azure Active Directory. + /// The endpoints that the Api Management + /// Service reaches the service at. + public OutboundEnvironmentEndpoint(string category = default(string), IList endpoints = default(IList)) + { + Category = category; + Endpoints = endpoints; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of service accessed by the Api Management + /// Service, e.g., Azure Storage, Azure SQL Database, and Azure Active + /// Directory. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets the endpoints that the Api Management Service reaches + /// the service at. + /// + [JsonProperty(PropertyName = "endpoints")] + public IList Endpoints { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs new file mode 100644 index 000000000000..8a8c8bce3edd --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Collection of Outbound Environment Endpoints + /// + public partial class OutboundEnvironmentEndpointList + { + /// + /// Initializes a new instance of the OutboundEnvironmentEndpointList + /// class. + /// + public OutboundEnvironmentEndpointList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OutboundEnvironmentEndpointList + /// class. + /// + /// Collection of resources. + /// Link to next page of resources. + public OutboundEnvironmentEndpointList(IList value, string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of resources. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets link to next page of resources. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterContract.cs index e699fd2443a1..683f004ac739 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterContract.cs @@ -39,7 +39,10 @@ public ParameterContract() /// Specifies whether parameter is required or /// not. /// Parameter values. - public ParameterContract(string name, string type, string description = default(string), string defaultValue = default(string), bool? required = default(bool?), IList values = default(IList)) + /// Schema identifier. + /// Type name defined by the schema. + /// Exampled defined for the parameter. + public ParameterContract(string name, string type, string description = default(string), string defaultValue = default(string), bool? required = default(bool?), IList values = default(IList), string schemaId = default(string), string typeName = default(string), IDictionary examples = default(IDictionary)) { Name = name; Description = description; @@ -47,6 +50,9 @@ public ParameterContract() DefaultValue = defaultValue; Required = required; Values = values; + SchemaId = schemaId; + TypeName = typeName; + Examples = examples; CustomInit(); } @@ -91,6 +97,24 @@ public ParameterContract() [JsonProperty(PropertyName = "values")] public IList Values { get; set; } + /// + /// Gets or sets schema identifier. + /// + [JsonProperty(PropertyName = "schemaId")] + public string SchemaId { get; set; } + + /// + /// Gets or sets type name defined by the schema. + /// + [JsonProperty(PropertyName = "typeName")] + public string TypeName { get; set; } + + /// + /// Gets or sets exampled defined for the parameter. + /// + [JsonProperty(PropertyName = "examples")] + public IDictionary Examples { get; set; } + /// /// Validate the object. /// diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterExampleContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterExampleContract.cs new file mode 100644 index 000000000000..ac0ed6285a01 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ParameterExampleContract.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameter example. + /// + public partial class ParameterExampleContract + { + /// + /// Initializes a new instance of the ParameterExampleContract class. + /// + public ParameterExampleContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParameterExampleContract class. + /// + /// Short description for the example + /// Long description for the example + /// Example value. May be a primitive value, or an + /// object. + /// A URL that points to the literal + /// example + public ParameterExampleContract(string summary = default(string), string description = default(string), object value = default(object), string externalValue = default(string)) + { + Summary = summary; + Description = description; + Value = value; + ExternalValue = externalValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets short description for the example + /// + [JsonProperty(PropertyName = "summary")] + public string Summary { get; set; } + + /// + /// Gets or sets long description for the example + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets example value. May be a primitive value, or an object. + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Gets or sets a URL that points to the literal example + /// + [JsonProperty(PropertyName = "externalValue")] + public string ExternalValue { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PlatformVersion.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PlatformVersion.cs new file mode 100644 index 000000000000..3f84a59ffb82 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PlatformVersion.cs @@ -0,0 +1,37 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for PlatformVersion. + /// + public static class PlatformVersion + { + /// + /// Platform version cannot be determined, as compute platform is not + /// deployed. + /// + public const string Undetermined = "undetermined"; + /// + /// Platform running the service on Single Tenant V1 platform. + /// + public const string Stv1 = "stv1"; + /// + /// Platform running the service on Single Tenant V2 platform. + /// + public const string Stv2 = "stv2"; + /// + /// Platform running the service on Multi Tenant V1 platform. + /// + public const string Mtv1 = "mtv1"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyContract.cs index 03dd081e2ec7..02a13d21d555 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyContract.cs @@ -34,10 +34,12 @@ public PolicyContract() /// /// Contents of the Policy as defined by the /// format. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Format of the policyContent. Possible values /// include: 'xml', 'xml-link', 'rawxml', 'rawxml-link' public PolicyContract(string value, string id = default(string), string name = default(string), string type = default(string), string format = default(string)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyDescriptionContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyDescriptionContract.cs index cd95d77a425a..b069a2cb31d9 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyDescriptionContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PolicyDescriptionContract.cs @@ -32,10 +32,12 @@ public PolicyDescriptionContract() /// /// Initializes a new instance of the PolicyDescriptionContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Policy description. /// Binary OR value of the Snippet scope. public PolicyDescriptionContract(string id = default(string), string name = default(string), string type = default(string), string description = default(string), long? scope = default(long?)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalDelegationSettings.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalDelegationSettings.cs index 1325ef745661..77c9f5894f59 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalDelegationSettings.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalDelegationSettings.cs @@ -32,10 +32,12 @@ public PortalDelegationSettings() /// /// Initializes a new instance of the PortalDelegationSettings class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// A delegation Url. /// A base64-encoded validation key to /// validate, that a request is coming from Azure API diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionContract.cs index 5997b9f7f07f..3ca116710ca9 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionContract.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// Portal revisions contract details. + /// Portal Revision's contract details. /// [Rest.Serialization.JsonTransformation] public partial class PortalRevisionContract : Resource @@ -32,19 +32,21 @@ public PortalRevisionContract() /// /// Initializes a new instance of the PortalRevisionContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Portal revision description. /// Portal revision publishing status /// details. - /// Portal revision publishing status. Possible + /// Status of the portal's revision. Possible /// values include: 'pending', 'publishing', 'completed', /// 'failed' - /// Indicates if the Portal Revision is + /// Indicates if the portal's revision is /// public. - /// Portal revision creation date and + /// Portal's revision creation date and /// time. /// Last updated date and time. public PortalRevisionContract(string id = default(string), string name = default(string), string type = default(string), string description = default(string), string statusDetails = default(string), string status = default(string), bool? isCurrent = default(bool?), System.DateTime? createdDateTime = default(System.DateTime?), System.DateTime? updatedDateTime = default(System.DateTime?)) @@ -77,20 +79,20 @@ public PortalRevisionContract() public string StatusDetails { get; private set; } /// - /// Gets portal revision publishing status. Possible values include: + /// Gets status of the portal's revision. Possible values include: /// 'pending', 'publishing', 'completed', 'failed' /// [JsonProperty(PropertyName = "properties.status")] public string Status { get; private set; } /// - /// Gets or sets indicates if the Portal Revision is public. + /// Gets or sets indicates if the portal's revision is public. /// [JsonProperty(PropertyName = "properties.isCurrent")] public bool? IsCurrent { get; set; } /// - /// Gets portal revision creation date and time. + /// Gets portal's revision creation date and time. /// [JsonProperty(PropertyName = "properties.createdDateTime")] public System.DateTime? CreatedDateTime { get; private set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionStatus.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionStatus.cs index fb095551b2e1..e10323f96124 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionStatus.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalRevisionStatus.cs @@ -17,19 +17,19 @@ namespace Microsoft.Azure.Management.ApiManagement.Models public static class PortalRevisionStatus { /// - /// Portal revision publishing is pending + /// Portal's revision has been queued. /// public const string Pending = "pending"; /// - /// Portal revision is publishing + /// Portal's revision is being published. /// public const string Publishing = "publishing"; /// - /// Portal revision publishing completed + /// Portal's revision publishing completed. /// public const string Completed = "completed"; /// - /// Portal revision publishing failed + /// Portal's revision publishing failed. /// public const string Failed = "failed"; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSettingsContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSettingsContract.cs index 9b1b75b1a1a6..04f4e78e0bee 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSettingsContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSettingsContract.cs @@ -32,10 +32,12 @@ public PortalSettingsContract() /// /// Initializes a new instance of the PortalSettingsContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// A delegation Url. /// A base64-encoded validation key to /// validate, that a request is coming from Azure API diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSigninSettings.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSigninSettings.cs index 5a9a3a802063..18cc72ec2efa 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSigninSettings.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSigninSettings.cs @@ -32,10 +32,12 @@ public PortalSigninSettings() /// /// Initializes a new instance of the PortalSigninSettings class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Redirect Anonymous users to the Sign-In /// page. public PortalSigninSettings(string id = default(string), string name = default(string), string type = default(string), bool? enabled = default(bool?)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSignupSettings.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSignupSettings.cs index fdda3b3c5339..0947461e2cc5 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSignupSettings.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PortalSignupSettings.cs @@ -32,10 +32,12 @@ public PortalSignupSettings() /// /// Initializes a new instance of the PortalSignupSettings class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Allow users to sign up on a developer /// portal. /// Terms of service contract diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PreferredIPVersion.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PreferredIPVersion.cs new file mode 100644 index 000000000000..e7efb4611c8d --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PreferredIPVersion.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for PreferredIPVersion. + /// + public static class PreferredIPVersion + { + public const string IPv4 = "IPv4"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpoint.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpoint.cs new file mode 100644 index 000000000000..047144376572 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpoint.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Private Endpoint resource. + /// + public partial class PrivateEndpoint + { + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + public PrivateEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + /// The ARM identifier for Private Endpoint + public PrivateEndpoint(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the ARM identifier for Private Endpoint + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..f50af91eae33 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnection.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Private Endpoint Connection resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateEndpointConnection : Resource + { + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + public PrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + /// A collection of + /// information about the state of the connection between service + /// consumer and provider. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// The resource of private end + /// point. + /// The provisioning state of the + /// private endpoint connection resource. Possible values include: + /// 'Succeeded', 'Creating', 'Deleting', 'Failed' + public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string)) + : base(id, name, type) + { + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + ProvisioningState = provisioningState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource of private end point. + /// + [JsonProperty(PropertyName = "properties.privateEndpoint")] + public PrivateEndpoint PrivateEndpoint { get; set; } + + /// + /// Gets or sets a collection of information about the state of the + /// connection between service consumer and provider. + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + + /// + /// Gets or sets the provisioning state of the private endpoint + /// connection resource. Possible values include: 'Succeeded', + /// 'Creating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrivateLinkServiceConnectionState == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs new file mode 100644 index 000000000000..e85bda01791d --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for PrivateEndpointConnectionProvisioningState. + /// + public static class PrivateEndpointConnectionProvisioningState + { + public const string Succeeded = "Succeeded"; + public const string Creating = "Creating"; + public const string Deleting = "Deleting"; + public const string Failed = "Failed"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequest.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequest.cs new file mode 100644 index 000000000000..1e7407e57d45 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequest.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A request to approve or reject a private endpoint connection + /// + public partial class PrivateEndpointConnectionRequest + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionRequest + /// class. + /// + public PrivateEndpointConnectionRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnectionRequest + /// class. + /// + /// Private Endpoint Connection Resource Id. + /// The connection state of the private + /// endpoint connection. + public PrivateEndpointConnectionRequest(string id = default(string), PrivateEndpointConnectionRequestProperties properties = default(PrivateEndpointConnectionRequestProperties)) + { + Id = id; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets private Endpoint Connection Resource Id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the connection state of the private endpoint + /// connection. + /// + [JsonProperty(PropertyName = "properties")] + public PrivateEndpointConnectionRequestProperties Properties { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs new file mode 100644 index 000000000000..98e09469e44a --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The connection state of the private endpoint connection. + /// + public partial class PrivateEndpointConnectionRequestProperties + { + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionRequestProperties class. + /// + public PrivateEndpointConnectionRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionRequestProperties class. + /// + /// A collection of + /// information about the state of the connection between service + /// consumer and provider. + public PrivateEndpointConnectionRequestProperties(PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) + { + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a collection of information about the state of the + /// connection between service consumer and provider. + /// + [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs new file mode 100644 index 000000000000..82ba25706a18 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for PrivateEndpointServiceConnectionStatus. + /// + public static class PrivateEndpointServiceConnectionStatus + { + public const string Pending = "Pending"; + public const string Approved = "Approved"; + public const string Rejected = "Rejected"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 000000000000..6416c3cee15a --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResource.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A private link resource + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateLinkResource : Resource + { + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + public PrivateLinkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// The private link resource group id. + /// The private link resource required + /// member names. + /// The private link resource Private + /// link DNS zone name. + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList)) + : base(id, name, type) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the private link resource group id. + /// + [JsonProperty(PropertyName = "properties.groupId")] + public string GroupId { get; private set; } + + /// + /// Gets the private link resource required member names. + /// + [JsonProperty(PropertyName = "properties.requiredMembers")] + public IList RequiredMembers { get; private set; } + + /// + /// Gets or sets the private link resource Private link DNS zone name. + /// + [JsonProperty(PropertyName = "properties.requiredZoneNames")] + public IList RequiredZoneNames { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResourceListResult.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..b837f57bdf1d --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkResourceListResult.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of private link resources + /// + public partial class PrivateLinkResourceListResult + { + /// + /// Initializes a new instance of the PrivateLinkResourceListResult + /// class. + /// + public PrivateLinkResourceListResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResourceListResult + /// class. + /// + /// Array of private link resources + public PrivateLinkResourceListResult(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets array of private link resources + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..83cb47617b68 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A collection of information about the state of the connection between + /// service consumer and provider. + /// + public partial class PrivateLinkServiceConnectionState + { + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + public PrivateLinkServiceConnectionState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + /// Indicates whether the connection has been + /// Approved/Rejected/Removed by the owner of the service. Possible + /// values include: 'Pending', 'Approved', 'Rejected' + /// The reason for approval/rejection of the + /// connection. + /// A message indicating if changes on + /// the service provider require any updates on the consumer. + public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string)) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates whether the connection has been + /// Approved/Rejected/Removed by the owner of the service. Possible + /// values include: 'Pending', 'Approved', 'Rejected' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the reason for approval/rejection of the connection. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets a message indicating if changes on the service + /// provider require any updates on the consumer. + /// + [JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProductContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProductContract.cs index 3675c89e78fb..e395bec0c276 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProductContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProductContract.cs @@ -33,10 +33,12 @@ public ProductContract() /// Initializes a new instance of the ProductContract class. /// /// Product name. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Product description. May include HTML /// formatting tags. /// Product terms of use. Developers trying to diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Protocol.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Protocol.cs index 839a9c2e139b..8b2096b0a8ae 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Protocol.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Protocol.cs @@ -10,51 +10,15 @@ namespace Microsoft.Azure.Management.ApiManagement.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for Protocol. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Protocol + public static class Protocol { - [EnumMember(Value = "http")] - Http, - [EnumMember(Value = "https")] - Https - } - internal static class ProtocolEnumExtension - { - internal static string ToSerializedValue(this Protocol? value) - { - return value == null ? null : ((Protocol)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this Protocol value) - { - switch( value ) - { - case Protocol.Http: - return "http"; - case Protocol.Https: - return "https"; - } - return null; - } - - internal static Protocol? ParseProtocol(this string value) - { - switch( value ) - { - case "http": - return Protocol.Http; - case "https": - return Protocol.Https; - } - return null; - } + public const string Http = "http"; + public const string Https = "https"; + public const string Ws = "ws"; + public const string Wss = "wss"; } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProxyResource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProxyResource.cs new file mode 100644 index 000000000000..726f2779ef90 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ProxyResource.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using System.Linq; + + /// + /// Proxy Resource + /// + /// + /// The resource model definition for a Azure Resource Manager proxy + /// resource. It will not have tags and a location + /// + public partial class ProxyResource : Resource + { + /// + /// Initializes a new instance of the ProxyResource class. + /// + public ProxyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProxyResource class. + /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + public ProxyResource(string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PublicNetworkAccess.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 000000000000..3ff0f7a3f451 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/PublicNetworkAccess.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for PublicNetworkAccess. + /// + public static class PublicNetworkAccess + { + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientEmailContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientEmailContract.cs index 61bc6382f4fb..ff6844cfbe1a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientEmailContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientEmailContract.cs @@ -32,10 +32,12 @@ public RecipientEmailContract() /// /// Initializes a new instance of the RecipientEmailContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// User Email subscribed to notification. public RecipientEmailContract(string id = default(string), string name = default(string), string type = default(string), string email = default(string)) : base(id, name, type) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientUserContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientUserContract.cs index 421f59520cb0..bc57c067e49f 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientUserContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RecipientUserContract.cs @@ -32,10 +32,12 @@ public RecipientUserContract() /// /// Initializes a new instance of the RecipientUserContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// API Management UserId subscribed to /// notification. public RecipientUserContract(string id = default(string), string name = default(string), string type = default(string), string userId = default(string)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs new file mode 100644 index 000000000000..d29a7c9e3167 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Remote Private Endpoint Connection resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class RemotePrivateEndpointConnectionWrapper + { + /// + /// Initializes a new instance of the + /// RemotePrivateEndpointConnectionWrapper class. + /// + public RemotePrivateEndpointConnectionWrapper() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RemotePrivateEndpointConnectionWrapper class. + /// + /// A collection of + /// information about the state of the connection between service + /// consumer and provider. + /// Private Endpoint connection resource id + /// Private Endpoint Connection Name + /// Private Endpoint Connection Resource + /// Type + /// The resource of private end + /// point. + /// The provisioning state of the + /// private endpoint connection resource. + /// All the Group ids. + public RemotePrivateEndpointConnectionWrapper(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), string provisioningState = default(string), IList groupIds = default(IList)) + { + Id = id; + Name = name; + Type = type; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + ProvisioningState = provisioningState; + GroupIds = groupIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets private Endpoint connection resource id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets private Endpoint Connection Name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets private Endpoint Connection Resource Type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the resource of private end point. + /// + [JsonProperty(PropertyName = "properties.privateEndpoint")] + public ArmIdWrapper PrivateEndpoint { get; set; } + + /// + /// Gets or sets a collection of information about the state of the + /// connection between service consumer and provider. + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + + /// + /// Gets the provisioning state of the private endpoint connection + /// resource. + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets all the Group ids. + /// + [JsonProperty(PropertyName = "properties.groupIds")] + public IList GroupIds { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrivateLinkServiceConnectionState == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RepresentationContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RepresentationContract.cs index 961be5f272b1..0a21884e8fc8 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RepresentationContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/RepresentationContract.cs @@ -34,7 +34,6 @@ public RepresentationContract() /// /// Specifies a registered or custom content /// type for this representation, e.g. application/xml. - /// An example of the representation. /// Schema identifier. Applicable only if /// 'contentType' value is neither 'application/x-www-form-urlencoded' /// nor 'multipart/form-data'. @@ -46,13 +45,15 @@ public RepresentationContract() /// Required if 'contentType' value is either /// 'application/x-www-form-urlencoded' or /// 'multipart/form-data'.. - public RepresentationContract(string contentType, string sample = default(string), string schemaId = default(string), string typeName = default(string), IList formParameters = default(IList)) + /// Exampled defined for the + /// representation. + public RepresentationContract(string contentType, string schemaId = default(string), string typeName = default(string), IList formParameters = default(IList), IDictionary examples = default(IDictionary)) { ContentType = contentType; - Sample = sample; SchemaId = schemaId; TypeName = typeName; FormParameters = formParameters; + Examples = examples; CustomInit(); } @@ -68,12 +69,6 @@ public RepresentationContract() [JsonProperty(PropertyName = "contentType")] public string ContentType { get; set; } - /// - /// Gets or sets an example of the representation. - /// - [JsonProperty(PropertyName = "sample")] - public string Sample { get; set; } - /// /// Gets or sets schema identifier. Applicable only if 'contentType' /// value is neither 'application/x-www-form-urlencoded' nor @@ -98,6 +93,12 @@ public RepresentationContract() [JsonProperty(PropertyName = "formParameters")] public IList FormParameters { get; set; } + /// + /// Gets or sets exampled defined for the representation. + /// + [JsonProperty(PropertyName = "examples")] + public IDictionary Examples { get; set; } + /// /// Validate the object. /// diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Resource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Resource.cs index 19d8d911bdef..0ca13ef3623a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Resource.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Resource.cs @@ -16,8 +16,12 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// The Resource definition. + /// Resource /// + /// + /// Common fields that are returned in the response for all Azure Resource + /// Manager resources + /// public partial class Resource : IResource { /// @@ -31,10 +35,12 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" public Resource(string id = default(string), string name = default(string), string type = default(string)) { Id = id; @@ -49,19 +55,22 @@ public Resource() partial void CustomInit(); /// - /// Gets resource ID. + /// Gets fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets resource name. + /// Gets the name of the resource /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets resource type for API Management resource. + /// Gets the type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs index 55f15d39d255..60ea1bdbd68d 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs @@ -32,31 +32,27 @@ public SchemaContract() /// /// Initializes a new instance of the SchemaContract class. /// - /// Must be a valid a media type used in a - /// Content-Type header as defined in the RFC 2616. Media type of the - /// schema document (e.g. application/json, application/xml). - /// </br> - `Swagger` Schema use - /// `application/vnd.ms-azure-apim.swagger.definitions+json` - /// </br> - `WSDL` Schema use - /// `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` - /// Schema use `application/vnd.oai.openapi.components+json` - /// </br> - `WADL Schema` use - /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. - /// Json escaped string defining the document - /// representing the Schema. Used for schemas other than - /// Swagger/OpenAPI. - /// Types definitions. Used for - /// Swagger/OpenAPI schemas only, null otherwise. - public SchemaContract(string contentType, string id = default(string), string name = default(string), string type = default(string), string value = default(string), object definitions = default(object)) + /// Schema Type. Immutable. Possible values + /// include: 'Xml', 'Json' + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Free-form schema entity + /// description. + /// Json-encoded string for non json-based + /// schema. + /// Schema document object for json-based schema + /// formats(e.g. json schema). + public SchemaContract(string schemaType, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string value = default(string), object document = default(object)) : base(id, name, type) { - ContentType = contentType; + SchemaType = schemaType; + Description = description; Value = value; - Definitions = definitions; + Document = document; CustomInit(); } @@ -66,33 +62,30 @@ public SchemaContract() partial void CustomInit(); /// - /// Gets or sets must be a valid a media type used in a Content-Type - /// header as defined in the RFC 2616. Media type of the schema - /// document (e.g. application/json, application/xml). - /// &lt;/br&gt; - `Swagger` Schema use - /// `application/vnd.ms-azure-apim.swagger.definitions+json` - /// &lt;/br&gt; - `WSDL` Schema use - /// `application/vnd.ms-azure-apim.xsd+xml` &lt;/br&gt; - - /// `OpenApi` Schema use `application/vnd.oai.openapi.components+json` - /// &lt;/br&gt; - `WADL Schema` use - /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// Gets or sets schema Type. Immutable. Possible values include: + /// 'Xml', 'Json' /// - [JsonProperty(PropertyName = "properties.contentType")] - public string ContentType { get; set; } + [JsonProperty(PropertyName = "properties.schemaType")] + public string SchemaType { get; set; } /// - /// Gets or sets json escaped string defining the document representing - /// the Schema. Used for schemas other than Swagger/OpenAPI. + /// Gets or sets free-form schema entity description. /// - [JsonProperty(PropertyName = "properties.document.value")] + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets json-encoded string for non json-based schema. + /// + [JsonProperty(PropertyName = "properties.value")] public string Value { get; set; } /// - /// Gets or sets types definitions. Used for Swagger/OpenAPI schemas - /// only, null otherwise. + /// Gets or sets schema document object for json-based schema + /// formats(e.g. json schema). /// - [JsonProperty(PropertyName = "properties.document.definitions")] - public object Definitions { get; set; } + [JsonProperty(PropertyName = "properties.document")] + public object Document { get; set; } /// /// Validate the object. @@ -102,9 +95,9 @@ public SchemaContract() /// public virtual void Validate() { - if (ContentType == null) + if (SchemaType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + throw new ValidationException(ValidationRules.CannotBeNull, "SchemaType"); } } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..2a333a5f0c1a --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for CreateOrUpdate operation. + /// + public partial class SchemaCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the SchemaCreateOrUpdateHeaders + /// class. + /// + public SchemaCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SchemaCreateOrUpdateHeaders + /// class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public SchemaCreateOrUpdateHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs new file mode 100644 index 000000000000..192f0a01b053 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for GetEntityTag operation. + /// + public partial class SchemaGetEntityTagHeaders + { + /// + /// Initializes a new instance of the SchemaGetEntityTagHeaders class. + /// + public SchemaGetEntityTagHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SchemaGetEntityTagHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public SchemaGetEntityTagHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs new file mode 100644 index 000000000000..4ecea3190a92 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class SchemaGetHeaders + { + /// + /// Initializes a new instance of the SchemaGetHeaders class. + /// + public SchemaGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SchemaGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public SchemaGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaType.cs new file mode 100644 index 000000000000..2a3271c3f440 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaType.cs @@ -0,0 +1,28 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for SchemaType. + /// + public static class SchemaType + { + /// + /// Xml schema type. + /// + public const string Xml = "xml"; + /// + /// Json schema type. + /// + public const string Json = "json"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Severity.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Severity.cs new file mode 100644 index 000000000000..5c190b243b73 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/Severity.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + + /// + /// Defines values for Severity. + /// + public static class Severity + { + public const string Error = "Error"; + public const string Warning = "Warning"; + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SoapApiType.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SoapApiType.cs index 4b1af292544f..0432e489d5c1 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SoapApiType.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SoapApiType.cs @@ -21,8 +21,16 @@ public static class SoapApiType /// public const string SoapToRest = "http"; /// - /// Imports the Soap API having a SOAP front end. + /// Imports the SOAP API having a SOAP front end. /// public const string SoapPassThrough = "soap"; + /// + /// Imports the API having a Websocket front end. + /// + public const string WebSocket = "websocket"; + /// + /// Imports the API having a GraphQL front end. + /// + public const string GraphQL = "graphql"; } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SubscriptionContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SubscriptionContract.cs index 5737a604039c..e168e03bdfaf 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SubscriptionContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SubscriptionContract.cs @@ -44,10 +44,12 @@ public SubscriptionContract() /// administrator, * expired – the subscription reached its expiration /// date and was deactivated. Possible values include: 'suspended', /// 'active', 'expired', 'submitted', 'rejected', 'cancelled' - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// The user resource identifier of the /// subscription owner. The value is a valid relative URL in the format /// of /users/{userId} where {userId} is a user identifier. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SystemData.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..91dc6b5215ec --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SystemData.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metadata pertaining to creation and last modification of the resource. + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// The identity that created the + /// resource. + /// The type of identity that created the + /// resource. Possible values include: 'User', 'Application', + /// 'ManagedIdentity', 'Key' + /// The timestamp of resource creation + /// (UTC). + /// The identity that last modified the + /// resource. + /// The type of identity that last + /// modified the resource. Possible values include: 'User', + /// 'Application', 'ManagedIdentity', 'Key' + /// The timestamp of resource last + /// modification (UTC) + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity that created the resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; set; } + + /// + /// Gets or sets the type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource creation (UTC). + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; set; } + + /// + /// Gets or sets the identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource last modification (UTC) + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; set; } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagContract.cs index a1b2a33496e2..e5864ec57530 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagContract.cs @@ -33,10 +33,12 @@ public TagContract() /// Initializes a new instance of the TagContract class. /// /// Tag name. - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" public TagContract(string displayName, string id = default(string), string name = default(string), string type = default(string)) : base(id, name, type) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagDescriptionContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagDescriptionContract.cs index 343ac9393717..7e7e676aec96 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagDescriptionContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagDescriptionContract.cs @@ -32,10 +32,12 @@ public TagDescriptionContract() /// /// Initializes a new instance of the TagDescriptionContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Description of the Tag. /// Absolute URL of external resources /// describing the tag. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagResourceContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagResourceContract.cs index ccfdb809b4fc..cd60ee590140 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagResourceContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TagResourceContract.cs @@ -31,7 +31,7 @@ public TagResourceContract() /// Initializes a new instance of the TagResourceContract class. /// /// Tag associated with the resource. - /// Api associated with the tag. + /// API associated with the tag. /// Operation associated with the tag. /// Product associated with the tag. public TagResourceContract(TagTagResourceContractProperties tag, ApiTagResourceContractProperties api = default(ApiTagResourceContractProperties), OperationTagResourceContractProperties operation = default(OperationTagResourceContractProperties), ProductTagResourceContractProperties product = default(ProductTagResourceContractProperties)) @@ -55,7 +55,7 @@ public TagResourceContract() public TagTagResourceContractProperties Tag { get; set; } /// - /// Gets or sets api associated with the tag. + /// Gets or sets API associated with the tag. /// [JsonProperty(PropertyName = "api")] public ApiTagResourceContractProperties Api { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs index d020b196a836..9e0b93f87576 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models /// Result of Tenant Configuration Sync State. /// [Rest.Serialization.JsonTransformation] - public partial class TenantConfigurationSyncStateContract + public partial class TenantConfigurationSyncStateContract : Resource { /// /// Initializes a new instance of the @@ -34,6 +34,12 @@ public TenantConfigurationSyncStateContract() /// Initializes a new instance of the /// TenantConfigurationSyncStateContract class. /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// The name of Git branch. /// The latest commit Id. /// value indicating if last sync was save @@ -52,7 +58,8 @@ public TenantConfigurationSyncStateContract() /// /// Most recent tenant configuration /// operation identifier - public TenantConfigurationSyncStateContract(string branch = default(string), string commitId = default(string), bool? isExport = default(bool?), bool? isSynced = default(bool?), bool? isGitEnabled = default(bool?), System.DateTime? syncDate = default(System.DateTime?), System.DateTime? configurationChangeDate = default(System.DateTime?), string lastOperationId = default(string)) + public TenantConfigurationSyncStateContract(string id = default(string), string name = default(string), string type = default(string), string branch = default(string), string commitId = default(string), bool? isExport = default(bool?), bool? isSynced = default(bool?), bool? isGitEnabled = default(bool?), System.DateTime? syncDate = default(System.DateTime?), System.DateTime? configurationChangeDate = default(System.DateTime?), string lastOperationId = default(string)) + : base(id, name, type) { Branch = branch; CommitId = commitId; diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantSettingsContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantSettingsContract.cs index eaa3f2d46d74..133cbd0fba72 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantSettingsContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TenantSettingsContract.cs @@ -34,10 +34,12 @@ public TenantSettingsContract() /// /// Initializes a new instance of the TenantSettingsContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Tenant settings public TenantSettingsContract(string id = default(string), string name = default(string), string type = default(string), IDictionary settings = default(IDictionary)) : base(id, name, type) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TrackedResource.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TrackedResource.cs new file mode 100644 index 000000000000..ff68a7610a96 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/TrackedResource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Tracked Resource + /// + /// + /// The resource model definition for an Azure Resource Manager tracked top + /// level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : Resource + { + /// + /// Initializes a new instance of the TrackedResource class. + /// + public TrackedResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackedResource class. + /// + /// The geo-location where the resource + /// lives + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Resource tags. + public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, type) + { + Tags = tags; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/UserContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/UserContract.cs index c70ff8a096ab..c089eaca80c2 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/UserContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/UserContract.cs @@ -34,10 +34,12 @@ public UserContract() /// /// Initializes a new instance of the UserContract class. /// - /// Resource ID. - /// Resource name. - /// Resource type for API Management - /// resource. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// Account state. Specifies whether the user is /// active or not. Blocked users are unable to sign into the developer /// portal or call any APIs of subscribed products. Default state is diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperations.cs new file mode 100644 index 000000000000..79729314acb1 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperations.cs @@ -0,0 +1,261 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OutboundNetworkDependenciesEndpointsOperations operations. + /// + internal partial class OutboundNetworkDependenciesEndpointsOperations : IServiceOperations, IOutboundNetworkDependenciesEndpointsOperations + { + /// + /// Initializes a new instance of the OutboundNetworkDependenciesEndpointsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OutboundNetworkDependenciesEndpointsOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Gets the network endpoints of all outbound dependencies of a ApiManagement + /// service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperationsExtensions.cs new file mode 100644 index 000000000000..519e07007c18 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/OutboundNetworkDependenciesEndpointsOperationsExtensions.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OutboundNetworkDependenciesEndpointsOperations. + /// + public static partial class OutboundNetworkDependenciesEndpointsOperationsExtensions + { + /// + /// Gets the network endpoints of all outbound dependencies of a ApiManagement + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static OutboundEnvironmentEndpointList ListByService(this IOutboundNetworkDependenciesEndpointsOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the network endpoints of all outbound dependencies of a ApiManagement + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this IOutboundNetworkDependenciesEndpointsOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs new file mode 100644 index 000000000000..f16e4c3498ec --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs @@ -0,0 +1,1372 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndpointConnectionOperations operations. + /// + internal partial class PrivateEndpointConnectionOperations : IServiceOperations, IPrivateEndpointConnectionOperations + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateEndpointConnectionOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all private endpoint connections of the API Management service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the Private Endpoint Connection specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetByName", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPrivateLinkResources", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private link resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPrivateLinkResourceWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateLinkSubResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (privateLinkSubResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkSubResourceName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("privateLinkSubResourceName", privateLinkSubResourceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResource", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{privateLinkSubResourceName}", System.Uri.EscapeDataString(privateLinkSubResourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (privateEndpointConnectionRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("privateEndpointConnectionRequest", privateEndpointConnectionRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(privateEndpointConnectionRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointConnectionRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs new file mode 100644 index 000000000000..75e31d2b0c6e --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs @@ -0,0 +1,389 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateEndpointConnectionOperations. + /// + public static partial class PrivateEndpointConnectionOperationsExtensions + { + /// + /// Lists all private endpoint connections of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IEnumerable ListByService(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists all private endpoint connections of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the Private Endpoint Connection specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + public static PrivateEndpointConnection GetByName(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName) + { + return operations.GetByNameAsync(resourceGroupName, serviceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the Private Endpoint Connection specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetByNameAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetByNameWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + public static PrivateEndpointConnection CreateOrUpdate(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest).GetAwaiter().GetResult(); + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + public static void Delete(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName) + { + operations.DeleteAsync(resourceGroupName, serviceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static PrivateLinkResourceListResult ListPrivateLinkResources(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListPrivateLinkResourcesAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task ListPrivateLinkResourcesAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private link resource. + /// + public static PrivateLinkResource GetPrivateLinkResource(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateLinkSubResourceName) + { + return operations.GetPrivateLinkResourceAsync(resourceGroupName, serviceName, privateLinkSubResourceName).GetAwaiter().GetResult(); + } + + /// + /// Description for Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private link resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetPrivateLinkResourceAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateLinkSubResourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPrivateLinkResourceWithHttpMessagesAsync(resourceGroupName, serviceName, privateLinkSubResourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + public static PrivateEndpointConnection BeginCreateOrUpdate(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest).GetAwaiter().GetResult(); + } + + /// + /// Creates a new Private Endpoint Connection or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, PrivateEndpointConnectionRequest privateEndpointConnectionRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + public static void BeginDelete(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName) + { + operations.BeginDeleteAsync(resourceGroupName, serviceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified Private Endpoint Connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string serviceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs new file mode 100644 index 000000000000..a78dc7528a03 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs @@ -0,0 +1,1449 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SchemaOperations operations. + /// + internal partial class SchemaOperations : IServiceOperations, ISchemaOperations + { + /// + /// Initializes a new instance of the SchemaOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SchemaOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the entity state (Etag) version of the Schema specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (schemaId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "schemaId"); + } + if (schemaId != null) + { + if (schemaId.Length > 80) + { + throw new ValidationException(ValidationRules.MaxLength, "schemaId", 80); + } + if (schemaId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("schemaId", schemaId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetEntityTag", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{schemaId}", System.Uri.EscapeDataString(schemaId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the Schema specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (schemaId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "schemaId"); + } + if (schemaId != null) + { + if (schemaId.Length > 80) + { + throw new ValidationException(ValidationRules.MaxLength, "schemaId", 80); + } + if (schemaId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("schemaId", schemaId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{schemaId}", System.Uri.EscapeDataString(schemaId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes specific Schema. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (schemaId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "schemaId"); + } + if (schemaId != null) + { + if (schemaId.Length > 80) + { + throw new ValidationException(ValidationRules.MaxLength, "schemaId", 80); + } + if (schemaId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("schemaId", schemaId); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{schemaId}", System.Uri.EscapeDataString(schemaId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (schemaId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "schemaId"); + } + if (schemaId != null) + { + if (schemaId.Length > 80) + { + throw new ValidationException(ValidationRules.MaxLength, "schemaId", 80); + } + if (schemaId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "schemaId", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("schemaId", schemaId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{schemaId}", System.Uri.EscapeDataString(schemaId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs new file mode 100644 index 000000000000..98f81dc02c5f --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs @@ -0,0 +1,387 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SchemaOperations. + /// + public static partial class SchemaOperationsExtensions + { + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this ISchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the entity state (Etag) version of the Schema specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + public static SchemaGetEntityTagHeaders GetEntityTag(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) + { + return operations.GetEntityTagAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult(); + } + + /// + /// Gets the entity state (Etag) version of the Schema specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetEntityTagAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetEntityTagWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + + /// + /// Gets the details of the Schema specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + public static SchemaContract Get(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) + { + return operations.GetAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the Schema specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + public static SchemaContract CreateOrUpdate(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes specific Schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Delete(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, schemaId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific Schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + public static SchemaContract BeginCreateOrUpdate(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates new or updates existing specified Schema of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Schema id identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Entity. Not required when creating an entity, but required when + /// updating an entity. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this ISchemaOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of schemas registered with service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this ISchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs index 33354475b07a..9424de8bbac3 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs @@ -19,78 +19,82 @@ public static IEnumerable> ApiInfo_ApiManagementCl { return new Tuple[] { - new Tuple("ApiManagement", "Api", "2020-12-01"), - new Tuple("ApiManagement", "ApiDiagnostic", "2020-12-01"), - new Tuple("ApiManagement", "ApiExport", "2020-12-01"), - new Tuple("ApiManagement", "ApiIssue", "2020-12-01"), - new Tuple("ApiManagement", "ApiIssueAttachment", "2020-12-01"), - new Tuple("ApiManagement", "ApiIssueComment", "2020-12-01"), - new Tuple("ApiManagement", "ApiManagementOperations", "2020-12-01"), - new Tuple("ApiManagement", "ApiManagementService", "2020-12-01"), - new Tuple("ApiManagement", "ApiManagementServiceSkus", "2020-12-01"), - new Tuple("ApiManagement", "ApiManagementSkus", "2020-12-01"), - new Tuple("ApiManagement", "ApiOperation", "2020-12-01"), - new Tuple("ApiManagement", "ApiOperationPolicy", "2020-12-01"), - new Tuple("ApiManagement", "ApiPolicy", "2020-12-01"), - new Tuple("ApiManagement", "ApiProduct", "2020-12-01"), - new Tuple("ApiManagement", "ApiRelease", "2020-12-01"), - new Tuple("ApiManagement", "ApiRevision", "2020-12-01"), - new Tuple("ApiManagement", "ApiSchema", "2020-12-01"), - new Tuple("ApiManagement", "ApiTagDescription", "2020-12-01"), - new Tuple("ApiManagement", "ApiVersionSet", "2020-12-01"), - new Tuple("ApiManagement", "AuthorizationServer", "2020-12-01"), - new Tuple("ApiManagement", "Backend", "2020-12-01"), - new Tuple("ApiManagement", "Cache", "2020-12-01"), - new Tuple("ApiManagement", "Certificate", "2020-12-01"), - new Tuple("ApiManagement", "ContentItem", "2020-12-01"), - new Tuple("ApiManagement", "ContentType", "2020-12-01"), - new Tuple("ApiManagement", "DelegationSettings", "2020-12-01"), - new Tuple("ApiManagement", "DeletedServices", "2020-12-01"), - new Tuple("ApiManagement", "Diagnostic", "2020-12-01"), - new Tuple("ApiManagement", "EmailTemplate", "2020-12-01"), - new Tuple("ApiManagement", "Gateway", "2020-12-01"), - new Tuple("ApiManagement", "GatewayApi", "2020-12-01"), - new Tuple("ApiManagement", "GatewayCertificateAuthority", "2020-12-01"), - new Tuple("ApiManagement", "GatewayHostnameConfiguration", "2020-12-01"), - new Tuple("ApiManagement", "Group", "2020-12-01"), - new Tuple("ApiManagement", "GroupUser", "2020-12-01"), - new Tuple("ApiManagement", "IdentityProvider", "2020-12-01"), - new Tuple("ApiManagement", "Issue", "2020-12-01"), - new Tuple("ApiManagement", "Logger", "2020-12-01"), - new Tuple("ApiManagement", "NamedValue", "2020-12-01"), - new Tuple("ApiManagement", "NetworkStatus", "2020-12-01"), - new Tuple("ApiManagement", "Notification", "2020-12-01"), - new Tuple("ApiManagement", "NotificationRecipientEmail", "2020-12-01"), - new Tuple("ApiManagement", "NotificationRecipientUser", "2020-12-01"), - new Tuple("ApiManagement", "OpenIdConnectProvider", "2020-12-01"), - new Tuple("ApiManagement", "Operation", "2020-12-01"), - new Tuple("ApiManagement", "Policy", "2020-12-01"), - new Tuple("ApiManagement", "PolicyDescription", "2020-12-01"), - new Tuple("ApiManagement", "PortalRevision", "2020-12-01"), - new Tuple("ApiManagement", "PortalSettings", "2020-12-01"), - new Tuple("ApiManagement", "Product", "2020-12-01"), - new Tuple("ApiManagement", "ProductApi", "2020-12-01"), - new Tuple("ApiManagement", "ProductGroup", "2020-12-01"), - new Tuple("ApiManagement", "ProductPolicy", "2020-12-01"), - new Tuple("ApiManagement", "ProductSubscriptions", "2020-12-01"), - new Tuple("ApiManagement", "QuotaByCounterKeys", "2020-12-01"), - new Tuple("ApiManagement", "QuotaByPeriodKeys", "2020-12-01"), - new Tuple("ApiManagement", "Region", "2020-12-01"), - new Tuple("ApiManagement", "Reports", "2020-12-01"), - new Tuple("ApiManagement", "SignInSettings", "2020-12-01"), - new Tuple("ApiManagement", "SignUpSettings", "2020-12-01"), - new Tuple("ApiManagement", "Subscription", "2020-12-01"), - new Tuple("ApiManagement", "Tag", "2020-12-01"), - new Tuple("ApiManagement", "TagResource", "2020-12-01"), - new Tuple("ApiManagement", "TenantAccess", "2020-12-01"), - new Tuple("ApiManagement", "TenantAccessGit", "2020-12-01"), - new Tuple("ApiManagement", "TenantConfiguration", "2020-12-01"), - new Tuple("ApiManagement", "TenantSettings", "2020-12-01"), - new Tuple("ApiManagement", "User", "2020-12-01"), - new Tuple("ApiManagement", "UserConfirmationPassword", "2020-12-01"), - new Tuple("ApiManagement", "UserGroup", "2020-12-01"), - new Tuple("ApiManagement", "UserIdentities", "2020-12-01"), - new Tuple("ApiManagement", "UserSubscription", "2020-12-01"), + new Tuple("ApiManagement", "Api", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiDiagnostic", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiExport", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssue", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssueAttachment", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssueComment", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementOperations", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementService", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementServiceSkus", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementSkus", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiOperation", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiOperationPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiProduct", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiRelease", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiRevision", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiSchema", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiTagDescription", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiVersionSet", "2021-04-01-preview"), + new Tuple("ApiManagement", "AuthorizationServer", "2021-04-01-preview"), + new Tuple("ApiManagement", "Backend", "2021-04-01-preview"), + new Tuple("ApiManagement", "Cache", "2021-04-01-preview"), + new Tuple("ApiManagement", "Certificate", "2021-04-01-preview"), + new Tuple("ApiManagement", "ContentItem", "2021-04-01-preview"), + new Tuple("ApiManagement", "ContentType", "2021-04-01-preview"), + new Tuple("ApiManagement", "DelegationSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "DeletedServices", "2021-04-01-preview"), + new Tuple("ApiManagement", "Diagnostic", "2021-04-01-preview"), + new Tuple("ApiManagement", "EmailTemplate", "2021-04-01-preview"), + new Tuple("ApiManagement", "Gateway", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayApi", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayCertificateAuthority", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayHostnameConfiguration", "2021-04-01-preview"), + new Tuple("ApiManagement", "Group", "2021-04-01-preview"), + new Tuple("ApiManagement", "GroupUser", "2021-04-01-preview"), + new Tuple("ApiManagement", "IdentityProvider", "2021-04-01-preview"), + new Tuple("ApiManagement", "Issue", "2021-04-01-preview"), + new Tuple("ApiManagement", "Logger", "2021-04-01-preview"), + new Tuple("ApiManagement", "NamedValue", "2021-04-01-preview"), + new Tuple("ApiManagement", "NetworkStatus", "2021-04-01-preview"), + new Tuple("ApiManagement", "Notification", "2021-04-01-preview"), + new Tuple("ApiManagement", "NotificationRecipientEmail", "2021-04-01-preview"), + new Tuple("ApiManagement", "NotificationRecipientUser", "2021-04-01-preview"), + new Tuple("ApiManagement", "OpenIdConnectProvider", "2021-04-01-preview"), + new Tuple("ApiManagement", "Operation", "2021-04-01-preview"), + new Tuple("ApiManagement", "OutboundNetworkDependenciesEndpoints", "2021-04-01-preview"), + new Tuple("ApiManagement", "PerformConnectivityCheckAsync", "2021-04-01-preview"), + new Tuple("ApiManagement", "Policy", "2021-04-01-preview"), + new Tuple("ApiManagement", "PolicyDescription", "2021-04-01-preview"), + new Tuple("ApiManagement", "PortalRevision", "2021-04-01-preview"), + new Tuple("ApiManagement", "PortalSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "PrivateEndpointConnection", "2021-04-01-preview"), + new Tuple("ApiManagement", "Product", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductApi", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductGroup", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductSubscriptions", "2021-04-01-preview"), + new Tuple("ApiManagement", "QuotaByCounterKeys", "2021-04-01-preview"), + new Tuple("ApiManagement", "QuotaByPeriodKeys", "2021-04-01-preview"), + new Tuple("ApiManagement", "Region", "2021-04-01-preview"), + new Tuple("ApiManagement", "Reports", "2021-04-01-preview"), + new Tuple("ApiManagement", "Schema", "2021-04-01-preview"), + new Tuple("ApiManagement", "SignInSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "SignUpSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "Subscription", "2021-04-01-preview"), + new Tuple("ApiManagement", "Tag", "2021-04-01-preview"), + new Tuple("ApiManagement", "TagResource", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantAccess", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantAccessGit", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantConfiguration", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "User", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserConfirmationPassword", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserGroup", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserIdentities", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserSubscription", "2021-04-01-preview"), }.AsEnumerable(); } }