api/generated/ruby/azure-iiot-opc-registry/generated/swagger/azure_opc_registry_client.rb
def update_gateway_async(gateway_id, body, custom_headers:nil)
      fail ArgumentError, 'gateway_id is nil' if gateway_id.nil?
      fail ArgumentError, 'body is nil' if body.nil?


      request_headers = {}
      request_headers['Content-Type'] = 'application/json-patch+json; charset=utf-8'

      # Serialize Request
      request_mapper = azure.iiot.opc.registry::Models::GatewayUpdateApiModel.mapper()
      request_content = self.serialize(request_mapper,  body)
      request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

      path_template = 'v2/gateways/{GatewayId}'

      request_url = @base_url || self.base_url

      options = {
          middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
          path_params: {'GatewayId' => gateway_id},
          body: request_content,
          headers: request_headers.merge(custom_headers || {}),
          base_url: request_url
      }
      promise = self.make_request_async(:patch, path_template, options)

      promise = promise.then do |result|
        http_response = result.response
        status_code = http_response.status
        response_content = http_response.body
        unless status_code == 200
          error_model = JSON.load(response_content)
          fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
        end


        result
      end

      promise.execute
    end
#
# Update Gateway configuration
#
# Allows a caller to configure operations on the Gateway module identified by
# the Gateway id.
#
# @param gateway_id [String] Gateway identifier
# @param body [GatewayUpdateApiModel] Patch request
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
Update Gateway configuration
Allows a caller to configure operations on the Gateway module identified by
the Gateway id.
Update Gateway configuration Allows a caller to configure operations on the Gateway module identified by the Gateway id .
def update_gateway_async(gateway_id, body, custom_headers:nil)
      fail ArgumentError, 'gateway_id is nil' if gateway_id.nil?
      fail ArgumentError, 'body is nil' if body.nil?
      request_headers = {}
      request_headers['Content-Type'] = 'application/json-patch+json; charset=utf-8'
      request_mapper = azure.iiot.opc.registry::Models::GatewayUpdateApiModel.mapper()
      request_content = self.serialize(request_mapper,  body)
      request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
      path_template = 'v2/gateways/{GatewayId}'
      request_url = @base_url || self.base_url
      options = {
          middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
          path_params: {'GatewayId' => gateway_id},
          body: request_content,
          headers: request_headers.merge(custom_headers || {}),
          base_url: request_url
      }
      promise = self.make_request_async(:patch, path_template, options)
      promise = promise.then do |result|
        http_response = result.response
        status_code = http_response.status
        response_content = http_response.body
        unless status_code == 200
          error_model = JSON.load(response_content)
          fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
        end
        result
      end
      promise.execute
    end
def update_gateway_async ( gateway_id , body , custom_headers : nil ) fail ArgumentError , 'gateway_id is nil' if gateway_id . nil? fail ArgumentError , 'body is nil' if body . nil? request_headers = { } request_headers [ 'Content-Type' ] = 'application/json-patch+json; charset=utf-8' request_mapper = azure . iiot . opc . registry :: Models :: GatewayUpdateApiModel . mapper ( ) request_content = self . serialize ( request_mapper , body ) request_content = request_content != nil ? JSON . generate ( request_content , quirks_mode : true ) : nil path_template = 'v2/gateways/{GatewayId}' request_url = @base_url || self . base_url options = { middlewares : [ [ MsRest :: RetryPolicyMiddleware , times : 3 , retry : 0.02 ] , [ :cookie_jar ] ] , path_params : { 'GatewayId' => gateway_id } , body : request_content , headers : request_headers . merge ( custom_headers || { } ) , base_url : request_url } promise = self . make_request_async ( :patch , path_template , options ) promise = promise . then do | result | http_response = result . response status_code = http_response . status response_content = http_response . body unless status_code == 200 error_model = JSON . load ( response_content ) fail MsRest :: HttpOperationError . new ( result . request , http_response , error_model ) end result end promise . execute end
Update Gateway configuration
Allows a caller to configure operations on the Gateway module identified by
the Gateway id.
Update Gateway configuration Allows a caller to configure operations on the Gateway module identified by the Gateway id .
# Serialize Request
Promise object which holds the HTTP response.
Promise object which holds the HTTP response .
Concurrent::Promise
gateway_id
None
body
None
custom_headers
A hash of custom headers that will be added to the HTTP request.
A hash of custom headers that will be added to the HTTP request .