/// <summary>
 /// Adds a new customer communication to an Azure support ticket. Adding
 /// attachments are not currently supported via the API. &lt;br/&gt;To add a
 /// file to a support ticket, visit the &lt;a target='_blank'
 /// href='https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest'&gt;Manage
 /// support ticket&lt;/a&gt; page in the Azure portal, select the support
 /// ticket, and use the file upload control to add a new file.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='communicationName'>
 /// Communication name
 /// </param>
 /// <param name='createCommunicationParameters'>
 /// Communication object
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CommunicationDetails> BeginCreateAsync(this ICommunicationsOperations operations, string supportTicketName, string communicationName, CommunicationDetails createCommunicationParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(supportTicketName, communicationName, createCommunicationParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all communications (attachments not included) for a support ticket.
 /// &lt;br/&gt;&lt;/br&gt; You can also filter support ticket communications by
 /// &lt;i&gt;CreatedDate&lt;/i&gt;�or &lt;i&gt;CommunicationType&lt;/i&gt;
 /// using the $filter parameter. The only type of communication supported today
 /// is &lt;i&gt;Web&lt;/i&gt;. Output will be a paged result with
 /// &lt;i&gt;nextLink&lt;/i&gt;, using which you can retrieve the next set of
 /// Communication results. &lt;br/&gt;&lt;br/&gt; Support ticket data is
 /// available for 12 months after ticket creation. If a ticket was created more
 /// than 12 months ago, a request for data might cause an error.
 /// </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 <CommunicationDetails> > ListNextAsync(this ICommunicationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all communications (attachments not included) for a support ticket.
 /// &lt;br/&gt;&lt;/br&gt; You can also filter support ticket communications by
 /// &lt;i&gt;CreatedDate&lt;/i&gt;�or &lt;i&gt;CommunicationType&lt;/i&gt;
 /// using the $filter parameter. The only type of communication supported today
 /// is &lt;i&gt;Web&lt;/i&gt;. Output will be a paged result with
 /// &lt;i&gt;nextLink&lt;/i&gt;, using which you can retrieve the next set of
 /// Communication results. &lt;br/&gt;&lt;br/&gt; Support ticket data is
 /// available for 12 months after ticket creation. If a ticket was created more
 /// than 12 months ago, a request for data might cause an error.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='top'>
 /// The number of values to return in the collection. Default is 10 and max is
 /// 10.
 /// </param>
 /// <param name='filter'>
 /// The filter to apply on the operation. You can filter by communicationType
 /// and createdDate properties. CommunicationType supports Equals ('eq')
 /// operator and createdDate supports Greater Than ('gt') and Greater Than or
 /// Equals ('ge') operators. You may combine the CommunicationType and
 /// CreatedDate filters by Logical And ('and') operator.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CommunicationDetails> > ListAsync(this ICommunicationsOperations operations, string supportTicketName, int?top = default(int?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(supportTicketName, top, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations             = new Operations(this);
     Services               = new ServicesOperations(this);
     ProblemClassifications = new ProblemClassificationsOperations(this);
     SupportTickets         = new SupportTicketsOperations(this);
     Communications         = new CommunicationsOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2019-05-01-preview";
     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>
 /// Lists all communications (attachments not included) for a support ticket.
 /// &lt;br/&gt;&lt;/br&gt; You can also filter support ticket communications by
 /// &lt;i&gt;CreatedDate&lt;/i&gt;�or &lt;i&gt;CommunicationType&lt;/i&gt;
 /// using the $filter parameter. The only type of communication supported today
 /// is &lt;i&gt;Web&lt;/i&gt;. Output will be a paged result with
 /// &lt;i&gt;nextLink&lt;/i&gt;, using which you can retrieve the next set of
 /// Communication results. &lt;br/&gt;&lt;br/&gt; Support ticket data is
 /// available for 12 months after ticket creation. If a ticket was created more
 /// than 12 months ago, a request for data might cause an error.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='top'>
 /// The number of values to return in the collection. Default is 10 and max is
 /// 10.
 /// </param>
 /// <param name='filter'>
 /// The filter to apply on the operation. You can filter by communicationType
 /// and createdDate properties. CommunicationType supports Equals ('eq')
 /// operator and createdDate supports Greater Than ('gt') and Greater Than or
 /// Equals ('ge') operators. You may combine the CommunicationType and
 /// CreatedDate filters by Logical And ('and') operator.
 /// </param>
 public static IPage <CommunicationDetails> List(this ICommunicationsOperations operations, string supportTicketName, int?top = default(int?), string filter = default(string))
 {
     return(operations.ListAsync(supportTicketName, top, filter).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Check the availability of a resource name. This API should to be used to
 /// check the uniqueness of the name for adding a new communication to the
 /// support ticket.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='checkNameAvailabilityInput'>
 /// Input to check
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckNameAvailabilityOutput> CheckNameAvailabilityAsync(this ICommunicationsOperations operations, string supportTicketName, CheckNameAvailabilityInput checkNameAvailabilityInput, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(supportTicketName, checkNameAvailabilityInput, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Check the availability of a resource name. This API should to be used to
 /// check the uniqueness of the name for adding a new communication to the
 /// support ticket.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='checkNameAvailabilityInput'>
 /// Input to check
 /// </param>
 public static CheckNameAvailabilityOutput CheckNameAvailability(this ICommunicationsOperations operations, string supportTicketName, CheckNameAvailabilityInput checkNameAvailabilityInput)
 {
     return(operations.CheckNameAvailabilityAsync(supportTicketName, checkNameAvailabilityInput).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all communications (attachments not included) for a support ticket.
 /// &lt;br/&gt;&lt;/br&gt; You can also filter support ticket communications by
 /// &lt;i&gt;CreatedDate&lt;/i&gt;�or &lt;i&gt;CommunicationType&lt;/i&gt;
 /// using the $filter parameter. The only type of communication supported today
 /// is &lt;i&gt;Web&lt;/i&gt;. Output will be a paged result with
 /// &lt;i&gt;nextLink&lt;/i&gt;, using which you can retrieve the next set of
 /// Communication results. &lt;br/&gt;&lt;br/&gt; Support ticket data is
 /// available for 12 months after ticket creation. If a ticket was created more
 /// than 12 months ago, a request for data might cause an error.
 /// </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 <CommunicationDetails> ListNext(this ICommunicationsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Adds a new customer communication to an Azure support ticket. Adding
 /// attachments are not currently supported via the API. &lt;br/&gt;To add a
 /// file to a support ticket, visit the &lt;a target='_blank'
 /// href='https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest'&gt;Manage
 /// support ticket&lt;/a&gt; page in the Azure portal, select the support
 /// ticket, and use the file upload control to add a new file.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='communicationName'>
 /// Communication name
 /// </param>
 /// <param name='createCommunicationParameters'>
 /// Communication object
 /// </param>
 public static CommunicationDetails BeginCreate(this ICommunicationsOperations operations, string supportTicketName, string communicationName, CommunicationDetails createCommunicationParameters)
 {
     return(operations.BeginCreateAsync(supportTicketName, communicationName, createCommunicationParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns details of a specific communication in a support ticket.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='supportTicketName'>
 /// Support ticket name
 /// </param>
 /// <param name='communicationName'>
 /// Communication name
 /// </param>
 public static CommunicationDetails Get(this ICommunicationsOperations operations, string supportTicketName, string communicationName)
 {
     return(operations.GetAsync(supportTicketName, communicationName).GetAwaiter().GetResult());
 }