Exemple #1
0
 /// <summary>
 /// Lists a collection of schemas registered with service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <GlobalSchemaContract> > ListByServiceAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery <GlobalSchemaContract> odataQuery = default(ODataQuery <GlobalSchemaContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Creates new or updates existing specified Schema of the API Management
 /// service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='parameters'>
 /// Create or update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. Not required when creating an entity, but required when
 /// updating an entity.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GlobalSchemaContract> BeginCreateOrUpdateAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract 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);
     }
 }
Exemple #3
0
 /// <summary>
 /// Gets the details of the Schema specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GlobalSchemaContract> GetAsync(this IGlobalSchemaOperations 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);
     }
 }
Exemple #4
0
 /// <summary>
 /// Gets the entity state (Etag) version of the Schema specified by its
 /// identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static GlobalSchemaGetEntityTagHeaders GetEntityTag(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId)
 {
     return(operations.GetEntityTagAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Lists a collection of schemas registered with service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <GlobalSchemaContract> ListByService(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery <GlobalSchemaContract> odataQuery = default(ODataQuery <GlobalSchemaContract>))
 {
     return(operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Lists a collection of schemas registered with service instance.
 /// </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 <GlobalSchemaContract> > ListByServiceNextAsync(this IGlobalSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #7
0
 /// <summary>
 /// Lists a collection of schemas registered with service instance.
 /// </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 <GlobalSchemaContract> ListByServiceNext(this IGlobalSchemaOperations operations, string nextPageLink)
 {
     return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #8
0
 /// <summary>
 /// Creates new or updates existing specified Schema of the API Management
 /// service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='parameters'>
 /// Create or update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. Not required when creating an entity, but required when
 /// updating an entity.
 /// </param>
 public static GlobalSchemaContract BeginCreateOrUpdate(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string))
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch).GetAwaiter().GetResult());
 }
Exemple #9
0
 /// <summary>
 /// Deletes specific Schema.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='ifMatch'>
 /// 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.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IGlobalSchemaOperations 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();
 }
Exemple #10
0
 /// <summary>
 /// Deletes specific Schema.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='ifMatch'>
 /// 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.
 /// </param>
 public static void Delete(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch)
 {
     operations.DeleteAsync(resourceGroupName, serviceName, schemaId, ifMatch).GetAwaiter().GetResult();
 }
Exemple #11
0
 /// <summary>
 /// Gets the details of the Schema specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='schemaId'>
 /// Schema id identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult());
 }