code: public RoleInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, RoleInner role) {
          return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).toBlocking().single().body();
      }
docs: Create or update a role.
  
  @param deviceName The device name.
  @param name The role name.
  @param resourceGroupName The resource group name.
  @param role The role properties.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the RoleInner object if successful.