/// <summary> /// Creates the incident comment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='incidentCommentId'> /// Incident comment ID /// </param> /// <param name='message'> /// The comment message /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IncidentComment> CreateCommentAsync(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, string message, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateCommentWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, message, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all incident comments. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='skipToken'> /// Skiptoken is only used if a previous operation returned a partial result. /// If a previous response contains a nextLink element, the value of the /// nextLink element will include a skiptoken parameter that specifies a /// starting point to use for subsequent calls. Optional. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <IncidentComment> > ListByIncidentAsync(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, ODataQuery <IncidentComment> odataQuery = default(ODataQuery <IncidentComment>), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByIncidentWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentId, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all incident comments. /// </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 <IncidentComment> > ListByIncidentNextAsync(this IIncidentCommentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByIncidentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); AlertRules = new AlertRulesOperations(this); Actions = new ActionsOperations(this); AlertRuleTemplates = new AlertRuleTemplatesOperations(this); Bookmarks = new BookmarksOperations(this); DataConnectors = new DataConnectorsOperations(this); Incidents = new IncidentsOperations(this); IncidentComments = new IncidentCommentsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2020-01-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 <AlertRule>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AlertRule>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AlertRuleTemplate>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AlertRuleTemplate>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <DataConnector>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <DataConnector>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Settings>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Settings>("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Gets all incident comments. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='skipToken'> /// Skiptoken is only used if a previous operation returned a partial result. /// If a previous response contains a nextLink element, the value of the /// nextLink element will include a skiptoken parameter that specifies a /// starting point to use for subsequent calls. Optional. /// </param> public static IPage <IncidentComment> ListByIncident(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, ODataQuery <IncidentComment> odataQuery = default(ODataQuery <IncidentComment>), string skipToken = default(string)) { return(operations.ListByIncidentAsync(resourceGroupName, workspaceName, incidentId, odataQuery, skipToken).GetAwaiter().GetResult()); }
/// <summary> /// Gets all incident comments. /// </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 <IncidentComment> ListByIncidentNext(this IIncidentCommentsOperations operations, string nextPageLink) { return(operations.ListByIncidentNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates the incident comment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='incidentCommentId'> /// Incident comment ID /// </param> /// <param name='message'> /// The comment message /// </param> public static IncidentComment CreateComment(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, string message) { return(operations.CreateCommentAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, message).GetAwaiter().GetResult()); }
/// <summary> /// Delete the incident comment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='incidentCommentId'> /// Incident comment ID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete the incident comment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='incidentCommentId'> /// Incident comment ID /// </param> public static void Delete(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId) { operations.DeleteAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates the incident comment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='incidentId'> /// Incident ID /// </param> /// <param name='incidentCommentId'> /// Incident comment ID /// </param> /// <param name='message'> /// The comment message /// </param> /// <param name='etag'> /// Etag of the azure resource /// </param> public static IncidentComment CreateOrUpdate(this IIncidentCommentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, string message, string etag = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, message, etag).GetAwaiter().GetResult()); }