code: public Observable<ServiceResponse<VpnGatewayInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) {
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (gatewayName == null) {
              throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null.");
          }
          if (vpnGatewayParameters == null) {
              throw new IllegalArgumentException("Parameter vpnGatewayParameters is required and cannot be null.");
          }
          Validator.validate(vpnGatewayParameters);
          final String apiVersion = "2018-08-01";
          Observable<Response<ResponseBody>> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, gatewayName, apiVersion, vpnGatewayParameters, this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VpnGatewayInner>() { }.getType());
      }
docs: Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
  
  @param resourceGroupName The resource group name of the VpnGateway.
  @param gatewayName The name of the gateway.
  @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request