code: public Observable<ServiceResponse<VirtualNetworkPeeringInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (virtualNetworkName == null) {
              throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.");
          }
          if (virtualNetworkPeeringName == null) {
              throw new IllegalArgumentException("Parameter virtualNetworkPeeringName is required and cannot be null.");
          }
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (virtualNetworkPeeringParameters == null) {
              throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null.");
          }
          Validator.validate(virtualNetworkPeeringParameters);
          final String apiVersion = "2018-08-01";
          Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualNetworkPeeringInner>() { }.getType());
      }
docs: Creates or updates a peering in the specified virtual network.
  
  @param resourceGroupName The name of the resource group.
  @param virtualNetworkName The name of the virtual network.
  @param virtualNetworkPeeringName The name of the peering.
  @param virtualNetworkPeeringParameters Parameters supplied to the create or update virtual network peering operation.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request