code: public ResourceNameAvailabilityInner checkNameAvailability(String name, CheckNameResourceTypes type) {
          return checkNameAvailabilityWithServiceResponseAsync(name, type).toBlocking().single().body();
      }
docs: Check if a resource name is available.
  Check if a resource name is available.
  
  @param name Resource name to verify.
  @param type Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers'
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws DefaultErrorResponseException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the ResourceNameAvailabilityInner object if successful.