syntax = "proto3";

package com.wixpress.appservice.api.upstream.com.wix.forms.upstream.wix.common;

option java_multiple_files = true;
option java_package = "com.wixpress.appservice.api.upstream.com.wix.forms.upstream.wix.common";

import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "wix/api/validations.proto";

message Image {
    option (.wix.api.decomposite_of) = "com.wix.forms.upstream.wix.common.Image";
  option (.wix.api.decomposition_minimum_fields) = {
    field: "id"
    field: "height"
    field: "width"
  };
  // WixMedia image ID.
  string id = 1 [(.wix.api.maxLength) = 100];
  // Image URL.
  string url = 2 [(.wix.api.maxLength) = 2000];
  // Original image height.
  int32 height = 3 [(.wix.api.readOnly) = true];
  // Original image width.
  int32 width = 4 [(.wix.api.readOnly) = true];
  // Image alt text.
  google.protobuf.StringValue alt_text = 5 [(.wix.api.maxLength) = 1000];
  // Image URL expiration date (when relevant).
  google.protobuf.Timestamp url_expiration_date = 6 [(.wix.api.readOnly) = true, (.wix.api.field_exposure) = PRIVATE];
  // Image filename.
  google.protobuf.StringValue filename = 7 [(.wix.api.readOnly) = true, (.wix.api.maxLength) = 1000];
  // Image size in bytes.
  google.protobuf.StringValue size_in_bytes = 8 [(.wix.api.readOnly) = true, (.wix.api.field_exposure) = PRIVATE, (.wix.api.format) = DECIMAL_VALUE, (.wix.api.decimalValue) = {maxScale: 10}];
}
