/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Accounts = new AccountsOperations(this); ConsumerInvitations = new ConsumerInvitationsOperations(this); DataSets = new DataSetsOperations(this); DataSetMappings = new DataSetMappingsOperations(this); EmailRegistrations = new EmailRegistrationsOperations(this); Invitations = new InvitationsOperations(this); Operations = new Operations(this); Shares = new SharesOperations(this); ProviderShareSubscriptions = new ProviderShareSubscriptionsOperations(this); ShareSubscriptions = new ShareSubscriptionsOperations(this); ConsumerSourceDataSets = new ConsumerSourceDataSetsOperations(this); SynchronizationSettings = new SynchronizationSettingsOperations(this); Triggers = new TriggersOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2020-09-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() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <DataSet>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <DataSet>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <DataSetMapping>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <DataSetMapping>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <SourceShareSynchronizationSetting>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <SourceShareSynchronizationSetting>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <SynchronizationSetting>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <SynchronizationSetting>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Trigger>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Trigger>("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Gets a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> /// <param name='ifNoneMatch'> /// ETag of the trigger entity. Should only be specified for get. If the ETag /// matches the existing entity tag, or if * was provided, then no content will /// be returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TriggerResource> GetAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// Creates or updates a trigger /// </param> /// <param name='name'> /// The trigger name. /// </param> /// <param name='trigger'> /// The trigger. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Trigger> BeginCreateOrUpdateAsync(this ITriggersOperations operations, string deviceName, string name, Trigger trigger, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, trigger, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get Trigger in a shareSubscription. /// </summary> /// <remarks> /// Get a Trigger in a shareSubscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='accountName'> /// The name of the share account. /// </param> /// <param name='shareSubscriptionName'> /// The name of the shareSubscription. /// </param> /// <param name='triggerName'> /// The name of the trigger. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Trigger> GetAsync(this ITriggersOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, triggerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List Triggers in a share subscription. /// </summary> /// <remarks> /// List Triggers in a share subscription /// </remarks> /// <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 <Trigger> > ListByShareSubscriptionNextAsync(this ITriggersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByShareSubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the triggers configured in the device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='expand'> /// Specify $filter='CustomContextTag eq <tag>' to filter on custom /// context tag property /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Trigger> > ListByDataBoxEdgeDeviceAsync(this ITriggersOperations operations, string deviceName, string resourceGroupName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDataBoxEdgeDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists triggers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <TriggerResource> > ListByFactoryAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query triggers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='filterParameters'> /// Parameters to filter the triggers. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TriggerQueryResponse> QueryByFactoryAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, filterParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query triggers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='filterParameters'> /// Parameters to filter the triggers. /// </param> public static TriggerQueryResponse QueryByFactory(this ITriggersOperations operations, string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters) { return(operations.QueryByFactoryAsync(resourceGroupName, factoryName, filterParameters).GetAwaiter().GetResult()); }
/// <summary> /// Get Trigger in a shareSubscription. /// </summary> /// <remarks> /// Get a Trigger in a shareSubscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='accountName'> /// The name of the share account. /// </param> /// <param name='shareSubscriptionName'> /// The name of the shareSubscription. /// </param> /// <param name='triggerName'> /// The name of the trigger. /// </param> public static Trigger Get(this ITriggersOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string triggerName) { return(operations.GetAsync(resourceGroupName, accountName, shareSubscriptionName, triggerName).GetAwaiter().GetResult()); }
/// <summary> /// Stops a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStopAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists triggers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> public static IPage <TriggerResource> ListByFactory(this ITriggersOperations operations, string resourceGroupName, string factoryName) { return(operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> /// <param name='ifNoneMatch'> /// ETag of the trigger entity. Should only be specified for get. If the ETag /// matches the existing entity tag, or if * was provided, then no content will /// be returned. /// </param> public static TriggerResource Get(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string)) { return(operations.GetAsync(resourceGroupName, factoryName, triggerName, ifNoneMatch).GetAwaiter().GetResult()); }
/// <summary> /// Get a specific trigger by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The trigger name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static Trigger Get(this ITriggersOperations operations, string deviceName, string name, string resourceGroupName) { return(operations.GetAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the triggers configured in the device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='expand'> /// Specify $filter='CustomContextTag eq <tag>' to filter on custom /// context tag property /// </param> public static IPage <Trigger> ListByDataBoxEdgeDevice(this ITriggersOperations operations, string deviceName, string resourceGroupName, string expand = default(string)) { return(operations.ListByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName, expand).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the triggers configured in the device. /// </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> public static IPage <Trigger> ListByDataBoxEdgeDeviceNext(this ITriggersOperations operations, string nextPageLink) { return(operations.ListByDataBoxEdgeDeviceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the trigger on the gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The trigger name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this ITriggersOperations operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the trigger on the gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The trigger name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static void BeginDelete(this ITriggersOperations operations, string deviceName, string name, string resourceGroupName) { operations.BeginDeleteAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult(); }
/// <summary> /// Unsubscribe event trigger from events. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> public static TriggerSubscriptionOperationStatus BeginUnsubscribeFromEvents(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) { return(operations.BeginUnsubscribeFromEventsAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult()); }
/// <summary> /// Unsubscribe event trigger from events. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TriggerSubscriptionOperationStatus> BeginUnsubscribeFromEventsAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUnsubscribeFromEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Stops a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> public static void BeginStop(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) { operations.BeginStopAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); }
/// <summary> /// List Triggers in a share subscription. /// </summary> /// <remarks> /// List Triggers in a share subscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='accountName'> /// The name of the share account. /// </param> /// <param name='shareSubscriptionName'> /// The name of the share subscription. /// </param> /// <param name='skipToken'> /// Continuation token /// </param> public static IPage <Trigger> ListByShareSubscription(this ITriggersOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string)) { return(operations.ListByShareSubscriptionAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken).GetAwaiter().GetResult()); }
/// <summary> /// Lists triggers. /// </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> public static IPage <TriggerResource> ListByFactoryNext(this ITriggersOperations operations, string nextPageLink) { return(operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List Triggers in a share subscription. /// </summary> /// <remarks> /// List Triggers in a share subscription /// </remarks> /// <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> public static IPage <Trigger> ListByShareSubscriptionNext(this ITriggersOperations operations, string nextPageLink) { return(operations.ListByShareSubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='triggerName'> /// The trigger name. /// </param> /// <param name='trigger'> /// Trigger resource definition. /// </param> /// <param name='ifMatch'> /// ETag of the trigger entity. Should only be specified for update, for which /// it should match existing entity or can be * for unconditional update. /// </param> public static TriggerResource CreateOrUpdate(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, TriggerResource trigger, string ifMatch = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, factoryName, triggerName, trigger, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a trigger. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// Creates or updates a trigger /// </param> /// <param name='name'> /// The trigger name. /// </param> /// <param name='trigger'> /// The trigger. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static Trigger BeginCreateOrUpdate(this ITriggersOperations operations, string deviceName, string name, Trigger trigger, string resourceGroupName) { return(operations.BeginCreateOrUpdateAsync(deviceName, name, trigger, resourceGroupName).GetAwaiter().GetResult()); }