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