/* tslint:disable */
/* eslint-disable */
/**
 * Apideck
 * The Apideck OpenAPI Spec: SDK Optimized
 *
 * The version of the OpenAPI document: 10.13.0
 * Contact: support@apideck.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists } from '../runtime'
/**
 *
 * @export
 * @interface SocialLink
 */
export interface SocialLink {
  /**
   * URL of the social link, e.g. https://www.twitter.com/apideck
   * @type {string}
   * @memberof SocialLink
   */
  url: string
  /**
   * Unique identifier of the social link
   * @type {string}
   * @memberof SocialLink
   */
  id?: string | null
  /**
   * Type of the social link, e.g. twitter
   * @type {string}
   * @memberof SocialLink
   */
  type?: string | null
}

export function SocialLinkFromJSON(json: any): SocialLink {
  return SocialLinkFromJSONTyped(json, false)
}

export function SocialLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SocialLink {
  if (json === undefined || json === null) {
    return json
  }
  return {
    url: json['url'],
    id: !exists(json, 'id') ? undefined : json['id'],
    type: !exists(json, 'type') ? undefined : json['type']
  }
}

export function SocialLinkToJSON(value?: SocialLink | null): any {
  if (value === undefined) {
    return undefined
  }
  if (value === null) {
    return null
  }
  return {
    url: value.url,
    id: value.id,
    type: value.type
  }
}
