export default {
  "metadata": { "section": "Common objects" },
  "definitions": {
    "TextStyle": {
      "optionalProperties": {
        "textAlignment": {
          "metadata": {
            "emitEnum": "TextStyle_TextAlignment",
            "description": "Text alignment. Supported values: <br> - `AUTO`: Text aligns itself automatically. <br> - `LEFT`: Text is aligned to the left. <br> - `RIGHT`: Text is aligned to the right. <br> - `CENTER`: Text is centered. <br> - `JUSTIFY`: Text is justified to both margins. <br> Default: `AUTO`."
          },
          "enum": ["AUTO", "LEFT", "RIGHT", "CENTER", "JUSTIFY"]
        },
        "lineHeight": {
          "metadata": {
            "description": "Vertical spacing between lines of text in an element."
          },
          "type": "string"
        }
      }
    },
    "Link": {
      "metadata": {
        "description": "Link object.",
        "oneOf": {
           "strict": true,
           "properties": ["url", "anchor"]
        }
      },
      "optionalProperties": {
        "url": {
          "metadata": {
            "description": "Absolute URL to link to."
          },
          "type": "string"
        },
        "anchor": {
          "metadata": {
            "description": "Target [Node ID](#node-ids) to link to."
          },
          "type": "string"
        },
        "target": {
          "metadata": {
            "emitEnum": "Link_Target",
            "description": "The HTML `target` attribute value for the link. This property defines where the link opens. <br> Supported values: <br> `SELF` - Opens the link in the same frame.<br> `BLANK` - Opens the link in a new browser tab or window.<br> `PARENT` - Opens the link in the parent frame.<br> `TOP` - Opens the link in the full body of the link's browser tab or window. <br> Default: `SELF`"
          },
          "enum": ["SELF", "BLANK", "PARENT", "TOP"]
        },
        "rel": {
          "metadata": {
            "description": "Relationship between the current document and the linked document."
          },
          "ref": "Link_Rel"
        },
        "customData": {
          "type": "string",
          "metadata": {
            "deprecated": true,
            "internal": true,
            "description": "A serialized object used for a custom or external link panel."
          }
        }
      }
    },
    "Link_Rel": {
      "optionalProperties": {
        "nofollow": {
          "metadata": {
            "description": "Indicates to search engine crawlers not to follow the link. \n Default: `false`"
          },
          "type": "boolean"
        },
        "sponsored": {
          "metadata": {
            "description": "Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. \n Default: `false`"
          },
          "type": "boolean"
        },
        "ugc": {
          "metadata": {
            "description": "Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page author. \n Default: `false`"
          },
          "type": "boolean"
        },
        "noreferrer": {
          "metadata": {
            "description": "Indicates that this link protects referral information from being passed to the target website."
          },
          "type": "boolean"
        }
      }
    },
    "FileSource": {
      "metadata": {
        "description": "File source object.",
        "oneOf": {
           "strict": true,
           "properties": ["url", "id"]
        }
      },
      "optionalProperties": {
        "url": {
          "metadata": { "description": "File source URL." },
          "type": "string"
        },
        "id": {
          "metadata": { "description": "ID that's resolved to a URL by a resolver function." },
          "type": "string"
        },
        "private": {
          "metadata": {
            "description": "Whether the file's source is private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) in Wix. \n Default: `false`"
          },
          "type": "boolean"
        }
      }
    },
    "Media": {
      "properties": {
        "src": {
          "metadata": { "description": "File source." },
          "ref": "FileSource"
        }
      },
      "optionalProperties": {
        "width": {
          "metadata": { "description": "Media width in pixels." },
          "type": "int32"
        },
        "height": {
          "metadata": { "description": "Media height in pixels." },
          "type": "int32"
        },
        "duration": {
          "metadata": {
            "description": "Media duration in seconds. Only relevant for audio and video files."
          },
          "type": "float64"
        }
      }
    },
    "Never": {
      "metadata": { "internal": true },
      "properties": {
        "_neverCreatedElement": {}
      }
    },
    "VerticalAlignment": {
      "metadata": {
        "emitEnum": "VerticalAlignment",
        "description": "Vertical alignment."
      },
      "enum": ["TOP", "MIDDLE", "BOTTOM"]
    },
    "BackgroundImage": {
      "optionalProperties": {
        "media": {
          "ref": "Media",
          "metadata": {
            "description": "Background image."
          }
        },
        "opacity": {
          "type": "int32",
          "metadata": {
            "description": "Background image opacity.",
            "validation": {
              "min": 0,
              "max": 100
            }
          }
        },
        "scaling": {
          "ref": "ImageScaling",
          "metadata": {
            "description": "Background image scaling."
          }
        },
        "position": {
          "ref": "ImagePosition",
          "metadata": {
            "description": "Position of background. Defaults to `CENTER`."
          }
        },
        "blur": {
          "type": "int32",
          "metadata": {
            "description": "Blur radius in pixels applied to the image layer. `0` (default) leaves the image unblurred; blur is independent of any color overlay and the two stack.",
            "validation": {
              "min": 0,
              "max": 40
            }
          }
        }
      }
    },
    "ImageScaling": {
      "metadata": {
        "emitEnum": "ImageScaling",
        "description": "Image scaling."
      },
      "enum": ["AUTO", "CONTAIN", "COVER"]
    },
    "ImagePosition": {
      "metadata": {
        "emitEnum": "ImagePosition",
        "description": "Image position."
      },
      "enum": [
        "CENTER",
        "CENTER_LEFT",
        "CENTER_RIGHT",
        "TOP",
        "TOP_LEFT",
        "TOP_RIGHT",
        "BOTTOM",
        "BOTTOM_LEFT",
        "BOTTOM_RIGHT"
      ]
    },
    "Gradient": {
      "discriminator": "type",
      "mapping": {
        "LINEAR": {
          "ref": "Gradient_Linear"
        },
        "RADIAL": {
          "ref": "Gradient_Radial"
        }
      },
      "metadata": {
        "refUnion": [
          "Gradient_Linear",
          "Gradient_Radial"
        ],
        "emitEnum": "Gradient_Type",
        "description": "Gradient configuration. Either linear or radial."
      }
    },
    "Background": {
      "discriminator": "type",
      "mapping": {
        "COLOR": {
          "ref": "Background_ColorVariant"
        },
        "GRADIENT": {
          "ref": "Background_GradientVariant"
        }
      },
      "metadata": {
        "refUnion": [
          "Background_ColorVariant",
          "Background_GradientVariant"
        ],
        "emitEnum": "Background_Type",
        "description": "Background styling. Either a solid color or gradient."
      }
    },
    "Background_ColorVariant": {
      "properties": {
        "type": {
          "enum": ["COLOR"]
        },
        "color": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Background color as a hexadecimal value."
          }
        }
      }
    },
    "Background_GradientVariant": {
      "properties": {
        "type": {
          "enum": ["GRADIENT"]
        },
        "gradient": {
          "ref": "Gradient",
          "metadata": {
            "description": "Gradient configuration."
          }
        }
      }
    },
    "Gradient_Linear": {
      "properties": {
        "type": {
          "enum": ["LINEAR"]
        },
        "stops": {
          "elements": {
            "ref": "Gradient_Stop"
          },
          "metadata": {
            "description": "Color stops for the gradient.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "angle": {
          "type": "int32",
          "metadata": {
            "description": "Angle in degrees for linear gradient (0-360). \n Default: `90`"
          }
        }
      }
    },
    "Gradient_Radial": {
      "properties": {
        "type": {
          "enum": ["RADIAL"]
        },
        "stops": {
          "elements": {
            "ref": "Gradient_Stop"
          },
          "metadata": {
            "description": "Color stops for the gradient.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "centerX": {
          "type": "float64",
          "metadata": {
            "description": "Horizontal center position (0-100). \n Default: `50`",
            "validation": {
              "min": 0,
              "max": 100
            }
          }
        },
        "centerY": {
          "type": "float64",
          "metadata": {
            "description": "Vertical center position (0-100). \n Default: `50`",
            "validation": {
              "min": 0,
              "max": 100
            }
          }
        }
      }
    },
    "Gradient_Stop": {
      "optionalProperties": {
        "color": {
          "type": "string",
          "metadata": {
            "format": "COLOR_VALUE",
            "description": "Stop color as a hexadecimal value."
          }
        },
        "position": {
          "type": "float64",
          "metadata": {
            "description": "Stop position (0-1). \n Default: `0`"
          }
        }
      }
    }
  }
}