/* tslint:disable */
/* eslint-disable */
/**
 * AutoGlue API
 * API for managing K3s clusters across cloud providers
 *
 * The version of the OpenAPI document: dev
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from "../runtime";
/**
 *
 * @export
 * @interface HandlersMemberUpsertReq
 */
export interface HandlersMemberUpsertReq {
  /**
   *
   * @type {string}
   * @memberof HandlersMemberUpsertReq
   */
  role?: string;
  /**
   *
   * @type {string}
   * @memberof HandlersMemberUpsertReq
   */
  user_id?: string;
}

/**
 * Check if a given object implements the HandlersMemberUpsertReq interface.
 */
export function instanceOfHandlersMemberUpsertReq(
  value: object,
): value is HandlersMemberUpsertReq {
  return true;
}

export function HandlersMemberUpsertReqFromJSON(
  json: any,
): HandlersMemberUpsertReq {
  return HandlersMemberUpsertReqFromJSONTyped(json, false);
}

export function HandlersMemberUpsertReqFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): HandlersMemberUpsertReq {
  if (json == null) {
    return json;
  }
  return {
    role: json["role"] == null ? undefined : json["role"],
    user_id: json["user_id"] == null ? undefined : json["user_id"],
  };
}

export function HandlersMemberUpsertReqToJSON(
  json: any,
): HandlersMemberUpsertReq {
  return HandlersMemberUpsertReqToJSONTyped(json, false);
}

export function HandlersMemberUpsertReqToJSONTyped(
  value?: HandlersMemberUpsertReq | null,
  ignoreDiscriminator: boolean = false,
): any {
  if (value == null) {
    return value;
  }

  return {
    role: value["role"],
    user_id: value["user_id"],
  };
}
