anchor.diff:    (serialized-server-authorization-policy-length :size)
     (instance-info-required :int))
   
  -(wrap-c-fun c-grpc-client-new-loas2-credentials
  -            "grpc_loas2_credentials_create"
  -            ((:pointer options))
  -            ()
  -            "This method creates a LOAS2 channel credential object.")
  +(defun c-grpc-client-new-loas2-credentials (options)
  +  "This method creates a LOAS2 channel credential object."
  +  (cffi:foreign-funcall "grpc_loas2_credentials_create"
  +                        :pointer options :pointer))
   
   (cffi:defcfun ("delete_grpc_loas2_credentials_options" grpc-loas2-credentials-options-delete)
       :void
     "Deletes OPTIONS, a grpc_loas2_credentials_options object."
      (options :pointer))
   
  -(wrap-c-fun c-grpc-client-new-alts-credentials
  -            "grpc_alts_credentials_create"
  -            ((:pointer options)
  -             (grpc-security-level min-security-level))
  -            ()
  -            "This method creates an ALTS channel credential object. The security
  -  level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.")
  -
  -(wrap-c-fun c-grpc-client-new-access-token-credentials
  -            "grpc_access_token_credentials_create"
  -            ((:string access_token))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates an Oauth2 Access Token credentials with an access token
  -that was acquired by an out of band mechanism.")
  -
  -(wrap-c-fun c-grpc-client-new-composite-call-credentials
  -            "grpc_composite_call_credentials_create"
  -            ((:pointer creds1)
  -             (:pointer creds2))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates a composite call credentials object.")
  -
  -(wrap-c-fun c-grpc-client-new-composite-channel-credentials
  -            "grpc_composite_channel_credentials_create"
  -            ((:pointer channel-creds)
  -             (:pointer call-creds))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates a composite channel credentials object. The security level of
  -  resulting connection is determined by CHANNEL-CREDS.")
  -
  -(wrap-c-fun c-grpc-client-new-local-credentials
  -            "grpc_local_credentials_create"
  -            ((:pointer type))
  -            ()
  -            "This method creates a local channel credential object. The security
  - level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY for UDS and
  -   GRPC_SECURITY_NONE for LOCAL_TCP.")
  -
  -(wrap-c-fun c-grpc-client-new-tls-credentials
  -            "grpc_tls_credentials_create"
  -            ((:pointer options))
  -            ()
  -            "Creates a TLS channel credential object based on the
  -  grpc_tls_credentials_options specified by callers. The
  -  security level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.")
  -
  -(wrap-c-fun c-grpc-client-new-google-default-credentials
  -            "grpc_google_default_credentials_create"
  -            ((:pointer options))
  -            ()
  -            "Creates default credentials to connect to a google gRPC service.
  -   WARNING: Do NOT use this credentials to connect to a non-google service as
  -   this could result in an oauth2 token leak. The security level of the
  -   resulting connection is GRPC_PRIVACY_AND_INTEGRITY.")
  -
  -(wrap-c-fun c-grpc-client-new-google-compute-engine-credentials
  -            "grpc_google_compute_engine_credentials_create"
  -            ()
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates a compute engine credentials object for connecting to Google.
  -   WARNING: Do NOT use this credentials to connect to a non-google service as
  -   this could result in an oauth2 token leak.")
  -
  -(wrap-c-fun c-grpc-client-new-xds-credentials
  -            "grpc_xds_credentials_create"
  -            ((:pointer fallback-credentials))
  -            ()
  -            "This method creates an xDS channel credentials object.")
  -
  -(wrap-c-fun c-grpc-client-new-external-account-credentials
  -            "grpc_external_account_credentials_create"
  -            ((:string json-string)
  -             (:string scopes-string))
  -            ()
  -            "Builds External Account credentials.
  +(defun c-grpc-client-new-alts-credentials (options min-security-level)
  +  "This method creates an ALTS channel credential object. The security
  +level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY."
  +  (cffi:foreign-funcall "grpc_alts_credentials_create"
  +                        :pointer options grpc-security-level min-security-level :pointer))
  +
  +(defun c-grpc-client-new-access-token-credentials (access_token)
  +  "Creates an Oauth2 Access Token credentials with an access token
  +that was acquired by an out of band mechanism."
  +  (cffi:foreign-funcall "grpc_access_token_credentials_create"
  +                        :string access_token
  +                        :pointer (cffi-sys:null-pointer)
  +                        :pointer))
  +
  +(defun c-grpc-client-new-composite-call-credentials (creds1 creds2)
  +  "Creates a composite call credentials object."
  +  (cffi:foreign-funcall "grpc_composite_call_credentials_create"
  +                        :pointer creds1
  +                        :pointer creds2
  +                        :pointer (cffi-sys:null-pointer)
  +                        :pointer))
  +
  +(defun c-grpc-client-new-composite-channel-credentials
  +    (channel-creds call-creds)
  +  "Creates a composite channel credentials object. The security level of
  +resulting connection is determined by CHANNEL-CREDS."
  +  (cffi:foreign-funcall "grpc_composite_channel_credentials_create"
  +                        :pointer channel-creds
  +                        :pointer call-creds
  +                        :pointer (cffi-sys:null-pointer)
  +                        :pointer))
  +
  +(defun c-grpc-client-new-local-credentials (type)
  +  "This method creates a local channel credential object. The security
  +level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY for UDS and
  +GRPC_SECURITY_NONE for LOCAL_TCP."
  +  (cffi:foreign-funcall "grpc_local_credentials_create" :pointer type :pointer))
  +
  +(defun c-grpc-client-new-tls-credentials (options)
  +  "Creates a TLS channel credential object based on the grpc_tls_credentials_options
  +specified by callers. The security level of the resulting connection is
  +GRPC_PRIVACY_AND_INTEGRITY."
  +  (cffi:foreign-funcall "grpc_tls_credentials_create" :pointer options :pointer))
  +
  +(defun c-grpc-client-new-google-default-credentials (options)
  +  "Creates default credentials to connect to a google gRPC service.
  +WARNING: Do NOT use this credentials to connect to a non-google service as
  +this could result in an oauth2 token leak. The security level of the
  +resulting connection is GRPC_PRIVACY_AND_INTEGRITY."
  +  (cffi:foreign-funcall "grpc_google_default_credentials_create"
  +                        :pointer options :pointer))
  +
  +(defun c-grpc-client-new-google-compute-engine-credentials ()
  +  "Creates a compute engine credentials object for connecting to Google.
  +WARNING: Do NOT use this credentials to connect to a non-google service as
  +this could result in an oauth2 token leak."
  +  (cffi:foreign-funcall "grpc_google_compute_engine_credentials_create"
  +                        :pointer (cffi-sys:null-pointer) :pointer))
  +
  +(defun c-grpc-client-new-xds-credentials (fallback-credentials)
  +  "This method creates an xDS channel credentials object."
  +  (cffi:foreign-funcall "grpc_xds_credentials_create"
  +                        :pointer fallback-credentials :pointer))
  +
  +(defun c-grpc-client-new-external-account-credentials (json-string scopes-string)
  +  "Builds External Account credentials.
    - JSON-STRING is the JSON string containing the credentials options.
  - - SCOPES-STRING contains the scopes to be binded with the credentials.")
  -
  -(wrap-c-fun c-grpc-client-new-refresh-token-credentials
  -            "grpc_google_refresh_token_credentials_create"
  -            ((:string json-refresh))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates an Oauth2 Refresh Token credentials object for connecting to Google.
  -   WARNING: Do NOT use this credentials to connect to a non-google service as
  -   this could result in an oauth2 token leak.
  + - SCOPES-STRING contains the scopes to be binded with the credentials."
  +  (cffi:foreign-funcall "grpc_external_account_credentials_create"
  +                        :string json-string :string scopes-string :pointer))
  +
  +(defun c-grpc-client-new-refresh-token-credentials (json-refresh)
  +  "Creates an Oauth2 Refresh Token credentials object for connecting to Google.
  +
  +WARNING: Do NOT use this credentials to connect to a non-google service as
  +         this could result in an oauth2 token leak.
  +
      - JSON-REFRESH-TOKEN is the JSON string containing the refresh token itself
  -     along with a client_id and client_secret")
  -
  -(wrap-c-fun c-grpc-client-new-google-iam-credentials
  -            "grpc_google_iam_credentials_create"
  -            ((:string authorization-token)
  -             (:string authorirt-selector))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates an IAM credentials object for connecting to Google.")
  -
  -(wrap-c-fun c-grpc-client-new-sts-credentials
  -            "grpc_sts_credentials_create"
  -            ((:pointer options))
  -            ((:pointer (cffi:null-pointer)))
  -            "Creates an STS credentials following the STS Token Exchanged specifed in the
  -   IETF draft https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16.")
  +     along with a client_id and client_secret"
  +  (cffi:foreign-funcall "grpc_google_refresh_token_credentials_create"
  +                        :string json-refresh :pointer (cffi-sys:null-pointer) :pointer))
  +
  +(defun c-grpc-client-new-google-iam-credentials (authorization-token authorirt-selector)
  +  "Creates an IAM credentials object for connecting to Google."
  +  (cffi:foreign-funcall "grpc_google_iam_credentials_create"
  +                        :string authorization-token
  +                        :string authorirt-selector
  +                        :pointer (cffi-sys:null-pointer)
  +                        :pointer))
  +
  +(defun c-grpc-client-new-sts-credentials (options)
  +  "Creates an STS credentials following the STS Token Exchanged specifed in the
  +   IETF draft https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16."
  +  (cffi:foreign-funcall "grpc_sts_credentials_create"
  +                        :pointer options :pointer (cffi-sys:null-pointer) :pointer))
   
   ;; gRPC Server Credentials
   
  -(wrap-c-fun c-grpc-server-new-loas2-credentials
  -            "grpc_loas2_server_credentials_create"
  -            ((:pointer options))
  -            ()
  -            "This method creates a LOAS2 channel credential object.")
  -
  -(wrap-c-fun c-grpc-server-new-ssl-credentials
  -            "grpc_ssl_server_credentials_create_with_options"
  -            ((:pointer options))
  -            ()
  -            "Creates an SSL server_credentials object using the provided options struct.")
  -
  -(wrap-c-fun c-grpc-server-new-ssl-credentials-options
  -            "grpc_ssl_server_credentials_create_options_using_config"
  -            ((grpc-ssl-client-certificate-request-type client-certificate-request)
  -             (:pointer certificate-config))
  -            ()
  -            " Creates an options object using a certificate config. Use this method when
  -   the certificates and keys of the SSL server will not change during the
  -   server's lifetime.")
  -
  -(wrap-c-fun c-grpc-server-new-local-credentials
  -            "grpc_local_server_credentials_create"
  -            ((:pointer type))
  -            ()
  -            "This method creates a local server credential object")
  -
  -(wrap-c-fun c-grpc-server-new-tls-credentials
  -            "grpc_tls_server_credentials_create"
  -            ((:pointer options))
  -            ()
  -            "Creates a TLS server credential object based on the
  -  grpc_tls_credentials_options specified by callers.")
  -
  -(wrap-c-fun c-grpc-server-new-xds-credentials
  -            "grpc_xds_server_credentials_create"
  -            ((:pointer fallback-credentials))
  -            ()
  -            "his method creates an xDS server credentials object.")
  -
  -(wrap-c-fun c-grpc-server-new-alts-credentials
  -            "grpc_alts_server_credentials_create"
  -            ((:pointer fallback-credentials))
  -            ()
  -            "This method creates an ALTS server credential object.")
  -
  -(wrap-c-fun c-grpc-completion-queue-create-for-pluck
  -            "grpc_completion_queue_create_for_pluck"
  -            ()
  -            ((:pointer (cffi:null-pointer)))
  -            "This wrapper creates a completion_queue* that is used to start a batch
  -of operation and check the success.")
  +(defun c-grpc-server-new-loas2-credentials (options)
  +  "This method creates a LOAS2 channel credential object."
  +  (cffi:foreign-funcall "grpc_loas2_server_credentials_create"
  +                        :pointer options :pointer))
  +
  +(defun c-grpc-server-new-ssl-credentials (options)
  +  "Creates an SSL server_credentials object using the provided options struct."
  +  (cffi:foreign-funcall "grpc_ssl_server_credentials_create_with_options"
  +                        :pointer options :pointer))
  +
  +(defun c-grpc-server-new-ssl-credentials-options (client-certificate-request certificate-config)
  +  "Creates an options object using a certificate config. Use this method when
  +the certificates and keys of the SSL server will not change during the
  +server's lifetime."
  +  (cffi:foreign-funcall
  +   "grpc_ssl_server_credentials_create_options_using_config"
  +   grpc-ssl-client-certificate-request-type client-certificate-request
  +   :pointer certificate-config :pointer))
  +
  +(defun c-grpc-server-new-local-credentials (type)
  +  "This method creates a local server credential object"
  +  (cffi:foreign-funcall "grpc_local_server_credentials_create"
  +                        :pointer type :pointer))
  +
  +(defun c-grpc-server-new-tls-credentials (options)
  +  "Creates a TLS server credential object based on the grpc_tls_credentials_options
  + specified by callers."
  +  (cffi:foreign-funcall "grpc_tls_server_credentials_create"
  +                        :pointer options :pointer))
  +
  +(defun c-grpc-server-new-xds-credentials (fallback-credentials)
  +  "his method creates an xDS server credentials object."
  +  (cffi:foreign-funcall "grpc_xds_server_credentials_create"
  +                        :pointer fallback-credentials :pointer))
  +
  +(defun c-grpc-server-new-alts-credentials (fallback-credentials)
  +  "This method creates an ALTS server credential object."
  +  (cffi:foreign-funcall "grpc_alts_server_credentials_create"
  +                        :pointer fallback-credentials :pointer))
  +
  +(defun c-grpc-completion-queue-create-for-pluck ()
  +  "This wrapper creates a completion_queue* that is used to start a batch
  +of operation and check the success."
  +  (cffi:foreign-funcall "grpc_completion_queue_create_for_pluck"
  +                        :pointer (cffi-sys:null-pointer) :pointer))
   
   ;; Wrapped grpc-client.cc functions
   
  
positive.code:   :GRPC-CALL-ERROR-COMPLETION-QUEUE-SHUTDOWN)
  
  ;; gRPC Client Channel wrappers
  (wrap-c-fun c-grpc-client-new-insecure-channel
              "grpc_insecure_channel_create"
              ((:string target)
              (:pointer args))
              ((:pointer (cffi:null-pointer)))
              "Creates a client channel to TARGET.")
  
  (wrap-c-fun c-grpc-client-new-secure-channel
              "grpc_secure_channel_create"
              ((:pointer creds)
               (:string target)
               (:pointer args))
              ((:pointer (cffi:null-pointer)))
              "Creates a secure channel to TARGET using the passed-in
   credentials CREDS. Additional channel level configuration MAY be provided
  by grpc_channel_args.")
  
  (wrap-c-fun c-grpc-client-new-default-channel
              "grpc_google_default_credentials_create"
              ((:pointer call-creds)
               (:string user-provided-audience))
               ()
              "Creates default credentials to connect to a google gRPC service.
     WARNING: Do NOT use this credentials to connect to a non-google service as
     this could result in an oauth2 token leak. The security level of the
     resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
  
     - CALL-CREDS is an optional parameter will be attached to the
     returned channel credentials object.
  
     - USER-PROVIDED-AUDIENCE is an optional field for user to override the
     audience in the JWT token if used.")
  
  ;; gRPC Client Credentials wrappers
  
  (wrap-c-fun c-grpc-client-new-ssl-credentials
              "grpc_ssl_credentials_create_ex"
              ((:pointer pem-roots-certs)
               (:pointer pem-key-cert-pair)
               (:pointer verify-options))
              ((:pointer (cffi:null-pointer)))
              "Creates an SSL credentials object.
     The security level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
     - PEM-ROOTS-CERTS is the PEM encoding of the server root certificates.
     - PEM-KEY-CERT-PAIR is a pointer on the object containing client's private
       key and certificate chain.
     - VERIFY-OPTIONS holds additional options controlling how peer certificates
       are verified.")
  
  (wrap-c-fun c-grpc-client-new-metadata-credentials
              "grpc_metadata_credentials_create_from_plugin"
              ((:pointer plugin)
               (grpc-security-level min-security-level))
              ()
              "This method creates a local channel credential object. The security
   level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY for UDS and
    GRPC_SECURITY_NONE for LOCAL_TCP. It is used for experimental purpose
    for now and subject to change.")
  
  (cffi:defcfun ("create_grpc_loas2_credentials_options"
                 create-grpc-loas2-credentials-options) :pointer
  
negative.code: ;;;; Lisp wrappers
  
  (in-package #:grpc)
  
  ;; gRPC Enums
  (cffi:defcenum grpc-security-level
  