/* tslint:disable */
/* eslint-disable */
/**
 * Ringer Business API
 * This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites,  phone numbers, payments, users, and other business resources.  Operations typically require authentication and appropriate permissions. 
 *
 * The version of the OpenAPI document: 1.0.5
 * Contact: support@ringer.tel
 *
 * 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';
import type { CallBlockAttributes } from './CallBlockAttributes';
import {
    CallBlockAttributesFromJSON,
    CallBlockAttributesFromJSONTyped,
    CallBlockAttributesToJSON,
    CallBlockAttributesToJSONTyped,
} from './CallBlockAttributes';

/**
 * 
 * @export
 * @interface CallBlockCreateRequestData
 */
export interface CallBlockCreateRequestData {
    /**
     * 
     * @type {string}
     * @memberof CallBlockCreateRequestData
     */
    type: CallBlockCreateRequestDataTypeEnum;
    /**
     * 
     * @type {CallBlockAttributes}
     * @memberof CallBlockCreateRequestData
     */
    attributes: CallBlockAttributes;
}


/**
 * @export
 */
export const CallBlockCreateRequestDataTypeEnum = {
    CallBlock: 'call-block'
} as const;
export type CallBlockCreateRequestDataTypeEnum = typeof CallBlockCreateRequestDataTypeEnum[keyof typeof CallBlockCreateRequestDataTypeEnum];


/**
 * Check if a given object implements the CallBlockCreateRequestData interface.
 */
export function instanceOfCallBlockCreateRequestData(value: object): value is CallBlockCreateRequestData {
    if (!('type' in value) || value['type'] === undefined) return false;
    if (!('attributes' in value) || value['attributes'] === undefined) return false;
    return true;
}

export function CallBlockCreateRequestDataFromJSON(json: any): CallBlockCreateRequestData {
    return CallBlockCreateRequestDataFromJSONTyped(json, false);
}

export function CallBlockCreateRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallBlockCreateRequestData {
    if (json == null) {
        return json;
    }
    return {
        
        'type': json['type'],
        'attributes': CallBlockAttributesFromJSON(json['attributes']),
    };
}

export function CallBlockCreateRequestDataToJSON(json: any): CallBlockCreateRequestData {
    return CallBlockCreateRequestDataToJSONTyped(json, false);
}

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

    return {
        
        'type': value['type'],
        'attributes': CallBlockAttributesToJSON(value['attributes']),
    };
}

