/* tslint:disable */
/* eslint-disable */
/**
 * Ticketing System API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.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'

/**
 *
 * @export
 * @interface NewGroup
 */
export interface NewGroup {
  /**
   *
   * @type {string}
   * @memberof NewGroup
   */
  name: string
  /**
   *
   * @type {Array<string>}
   * @memberof NewGroup
   */
  permissions: Array<string>
}

/**
 * Check if a given object implements the NewGroup interface.
 */
export function instanceOfNewGroup(value: object): value is NewGroup {
  if (!('name' in value) || value['name'] === undefined) return false
  if (!('permissions' in value) || value['permissions'] === undefined) return false
  return true
}

export function NewGroupFromJSON(json: any): NewGroup {
  return NewGroupFromJSONTyped(json, false)
}

export function NewGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewGroup {
  if (json == null) {
    return json
  }
  return {
    name: json['name'],
    permissions: json['permissions']
  }
}

export function NewGroupToJSON(json: any): NewGroup {
  return NewGroupToJSONTyped(json, false)
}

export function NewGroupToJSONTyped(
  value?: NewGroup | null,
  ignoreDiscriminator: boolean = false
): any {
  if (value == null) {
    return value
  }

  return {
    name: value['name'],
    permissions: value['permissions']
  }
}
