/// <summary>
 /// Get a specific `Partner`.
 /// </summary>
 /// <remarks>
 /// Get the management partner using the objectId and tenantId.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PartnerResponse> GetAsync(this IPartnersOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets an integration account partner.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='partnerName'>
 /// The integration account partner name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IntegrationAccountPartnerInner> GetAsync(this IPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Partner        = new PartnerOperations(this);
     Operation      = new OperationOperations(this);
     Partners       = new PartnersOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2018-02-01";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Gets a list of integration account partners.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <IntegrationAccountPartnerInner> > ListByIntegrationAccountsAsync(this IPartnersOperations operations, string resourceGroupName, string integrationAccountName, ODataQuery <IntegrationAccountPartnerFilterInner> odataQuery = default(ODataQuery <IntegrationAccountPartnerFilterInner>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByIntegrationAccountsWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of integration account partners.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <IntegrationAccountPartnerInner> > ListByIntegrationAccountsNextAsync(this IPartnersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByIntegrationAccountsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes an integration account partner.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='integrationAccountName'>
 /// The integration account name.
 /// </param>
 /// <param name='partnerName'>
 /// The integration account partner name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Get a specific `Partner`.
 /// </summary>
 /// <remarks>
 /// Get the management partner using the objectId and tenantId.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static PartnerResponse Get(this IPartnersOperations operations)
 {
     return(operations.GetAsync().GetAwaiter().GetResult());
 }