/* 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 ApiGroupPermissions
 */
export interface ApiGroupPermissions {
  /**
   *
   * @type {string}
   * @memberof ApiGroupPermissions
   */
  addMembers?: ApiGroupPermissionsAddMembersEnum;
  /**
   *
   * @type {string}
   * @memberof ApiGroupPermissions
   */
  editGroup?: ApiGroupPermissionsEditGroupEnum;
}

/**
 * @export
 */
export const ApiGroupPermissionsAddMembersEnum = {
  OnlyAdmins: "only-admins",
  EveryMember: "every-member",
} as const;
export type ApiGroupPermissionsAddMembersEnum =
  (typeof ApiGroupPermissionsAddMembersEnum)[keyof typeof ApiGroupPermissionsAddMembersEnum];

/**
 * @export
 */
export const ApiGroupPermissionsEditGroupEnum = {
  OnlyAdmins: "only-admins",
  EveryMember: "every-member",
} as const;
export type ApiGroupPermissionsEditGroupEnum =
  (typeof ApiGroupPermissionsEditGroupEnum)[keyof typeof ApiGroupPermissionsEditGroupEnum];

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

export function ApiGroupPermissionsFromJSON(json: any): ApiGroupPermissions {
  return ApiGroupPermissionsFromJSONTyped(json, false);
}

export function ApiGroupPermissionsFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): ApiGroupPermissions {
  if (json == null) {
    return json;
  }
  return {
    addMembers: json["add_members"] == null ? undefined : json["add_members"],
    editGroup: json["edit_group"] == null ? undefined : json["edit_group"],
  };
}

export function ApiGroupPermissionsToJSON(
  value?: ApiGroupPermissions | null,
): any {
  if (value == null) {
    return value;
  }
  return {
    add_members: value["addMembers"],
    edit_group: value["editGroup"],
  };
}
