/* tslint:disable */
/* eslint-disable */
/**
 * Signal Cli REST API
 * This is the Signal Cli REST API documentation.
 *
 * The version of the OpenAPI document: 1.0
 *
 *
 * 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.js";
/**
 *
 * @export
 * @interface ClientGroupEntry
 */
export interface ClientGroupEntry {
  /**
   *
   * @type {Array<string>}
   * @memberof ClientGroupEntry
   */
  admins?: Array<string>;
  /**
   *
   * @type {boolean}
   * @memberof ClientGroupEntry
   */
  blocked?: boolean;
  /**
   *
   * @type {string}
   * @memberof ClientGroupEntry
   */
  id?: string;
  /**
   *
   * @type {string}
   * @memberof ClientGroupEntry
   */
  internalId?: string;
  /**
   *
   * @type {string}
   * @memberof ClientGroupEntry
   */
  inviteLink?: string;
  /**
   *
   * @type {Array<string>}
   * @memberof ClientGroupEntry
   */
  members?: Array<string>;
  /**
   *
   * @type {string}
   * @memberof ClientGroupEntry
   */
  name?: string;
  /**
   *
   * @type {Array<string>}
   * @memberof ClientGroupEntry
   */
  pendingInvites?: Array<string>;
  /**
   *
   * @type {Array<string>}
   * @memberof ClientGroupEntry
   */
  pendingRequests?: Array<string>;
}

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

export function ClientGroupEntryFromJSON(json: any): ClientGroupEntry {
  return ClientGroupEntryFromJSONTyped(json, false);
}

export function ClientGroupEntryFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): ClientGroupEntry {
  if (json == null) {
    return json;
  }
  return {
    admins: json["admins"] == null ? undefined : json["admins"],
    blocked: json["blocked"] == null ? undefined : json["blocked"],
    id: json["id"] == null ? undefined : json["id"],
    internalId: json["internal_id"] == null ? undefined : json["internal_id"],
    inviteLink: json["invite_link"] == null ? undefined : json["invite_link"],
    members: json["members"] == null ? undefined : json["members"],
    name: json["name"] == null ? undefined : json["name"],
    pendingInvites:
      json["pending_invites"] == null ? undefined : json["pending_invites"],
    pendingRequests:
      json["pending_requests"] == null ? undefined : json["pending_requests"],
  };
}

export function ClientGroupEntryToJSON(value?: ClientGroupEntry | null): any {
  if (value == null) {
    return value;
  }
  return {
    admins: value["admins"],
    blocked: value["blocked"],
    id: value["id"],
    internal_id: value["internalId"],
    invite_link: value["inviteLink"],
    members: value["members"],
    name: value["name"],
    pending_invites: value["pendingInvites"],
    pending_requests: value["pendingRequests"],
  };
}
