Method: labels.delta

تعمل على تعديل تصنيف واحد من خلال تطبيق مجموعة من طلبات التعديل، ما يؤدي إلى إنشاء مسودة جديدة. التحديث المجمّع هو كل شيء أو لا شيء: إذا كان أي من طلبات التعديل غير صالح، فلن يتم تطبيق أي تغييرات. يجب نشر النسخة السابقة من المسودة قبل أن يمكن استخدام التغييرات مع عناصر Drive.

طلب HTTP

POST https://drivelabels.googleapis.com/v2/{name=labels/*}:delta

يستخدم عنوان URL بنية تحويل الترميز gRPC.

معلمات المسار

المَعلمات
name

string

مطلوبة. اسم مورد التصنيف المطلوب تحديثه.

نص الطلب

يحتوي نص الطلب على بيانات بالبنية التالية:

تمثيل JSON
{
  "writeControl": {
    object (WriteControl)
  },
  "requests": [
    {
      object (Request)
    }
  ],
  "useAdminAccess": boolean,
  "view": enum (LabelView),
  "languageCode": string
}
الحقول
writeControl

object (WriteControl)

توفر إمكانية التحكم في كيفية تنفيذ طلبات الكتابة.

requests[]

object (Request)

قائمة بالتعديلات المطلوب تطبيقها على التصنيف سيتم تطبيق الطلبات بالترتيب الذي تم تحديدها به.

useAdminAccess

boolean

يمكنك ضبط القيمة على true لاستخدام بيانات اعتماد المشرف الخاصة بالمستخدم. سيتحقق الخادم من أن المستخدم هو مشرف التصنيف قبل السماح بالوصول.

view

enum (LabelView)

عند تحديدها، لن يتم عرض سوى حقول معينة تتعلق بالملف الشخصي المشار إليه.

languageCode

string

رمز اللغة BCP-47 المطلوب استخدامه لتقييم تصنيفات الحقول المترجَمة عندما تكون include_label_in_response هي true.

نص الاستجابة

إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:

ردّ بشأن تعديل التصنيف

تمثيل JSON
{
  "responses": [
    {
      object (Response)
    }
  ],
  "updatedLabel": {
    object (Label)
  }
}
الحقول
responses[]

object (Response)

الردّ على التعديلات يؤدي هذا إلى الربط بين 1:1 والتعديلات، على الرغم من أنّ الردود على بعض الطلبات قد تكون فارغة.

updatedLabel

object (Label)

التصنيف بعد تطبيق التعديلات. يتم ضبط السياسة فقط إذا كانت قيمة [BatchUpdateLabelResponse2.include_label_in_response] هي true ولم تحدث أي أخطاء.

نطاقات التفويض

يتطلب استخدام أحد نطاقات OAuth التالية:

  • https://www.googleapis.com/auth/drive.labels
  • https://www.googleapis.com/auth/drive.admin.labels

لمزيد من المعلومات، يُرجى الاطّلاع على دليل التفويض.

الطلب

هو نوع واحد من التعديلات يتم تطبيقه على التصنيف.

تمثيل JSON
{

  // Union field kind can be only one of the following:
  "updateLabel": {
    object (UpdateLabelPropertiesRequest)
  },
  "createField": {
    object (CreateFieldRequest)
  },
  "updateField": {
    object (UpdateFieldPropertiesRequest)
  },
  "updateFieldType": {
    object (UpdateFieldTypeRequest)
  },
  "enableField": {
    object (EnableFieldRequest)
  },
  "disableField": {
    object (DisableFieldRequest)
  },
  "deleteField": {
    object (DeleteFieldRequest)
  },
  "createSelectionChoice": {
    object (CreateSelectionChoiceRequest)
  },
  "updateSelectionChoiceProperties": {
    object (UpdateSelectionChoicePropertiesRequest)
  },
  "enableSelectionChoice": {
    object (EnableSelectionChoiceRequest)
  },
  "disableSelectionChoice": {
    object (DisableSelectionChoiceRequest)
  },
  "deleteSelectionChoice": {
    object (DeleteSelectionChoiceRequest)
  }
  // End of list of possible types for union field kind.
}
الحقول
حقل الاتحاد kind نوع التحديث. يجب ملء حقل واحد فقط. يمكن أن يكون الحقل "kind" واحدًا فقط مما يلي:
updateLabel

object (UpdateLabelPropertiesRequest)

لتعديل خصائص التصنيف.

createField

object (CreateFieldRequest)

تنشئ حقلاً جديدًا.

updateField

object (UpdateFieldPropertiesRequest)

تحديث الخصائص الأساسية للحقل.

updateFieldType

object (UpdateFieldTypeRequest)

تعديل نوع الحقل و/أو خيارات النوع.

enableField

object (EnableFieldRequest)

لتفعيل الحقل.

disableField

object (DisableFieldRequest)

لإيقاف الحقل.

deleteField

object (DeleteFieldRequest)

لحذف حقل من التصنيف.

createSelectionChoice

object (CreateSelectionChoiceRequest)

لإنشاء اختيار داخل حقل "التحديد".

updateSelectionChoiceProperties

object (UpdateSelectionChoicePropertiesRequest)

عدِّل سمات "الاختيار" ضمن حقل اختيار.

enableSelectionChoice

object (EnableSelectionChoiceRequest)

تفعيل "اختيار" ضمن حقل "اختيار"

disableSelectionChoice

object (DisableSelectionChoiceRequest)

إيقاف اختيار داخل حقل اختيار

deleteSelectionChoice

object (DeleteSelectionChoiceRequest)

حذف اختيار ضمن حقل اختيار

UpdateLabelPropertiesRequest

تحدّث الخصائص الأساسية للتصنيف.

تمثيل JSON
{
  "updateMask": string,
  "properties": {
    object (Properties)
  }
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. الجذر label_properties ضمني ويجب عدم تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

properties

object (Properties)

مطلوبة. خصائص التصنيف المطلوب تعديلها

CreateFieldRequest

اطلب إنشاء حقل ضمن تصنيف.

تمثيل JSON
{
  "field": {
    object (Field)
  }
}
الحقول
field

object (Field)

مطلوبة. الحقل المطلوب إنشاؤه

UpdateFieldPropertiesRequest

اطلب تعديل مواقع "الحقل".

تمثيل JSON
{
  "updateMask": string,
  "id": string,
  "properties": {
    object (Properties)
  }
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. الجذر properties ضمني ويجب عدم تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

id

string

مطلوبة. الحقل المطلوب تحديثه.

properties

object (Properties)

مطلوبة. خصائص الحقل الأساسي

UpdateFieldTypeRequest

اطلب تغيير نوع الحقل.

تمثيل JSON
{
  "updateMask": string,
  "id": string,

  // Union field type_options can be only one of the following:
  "textOptions": {
    object (TextOptions)
  },
  "longTextOptions": {
    object (LongTextOptions)
  },
  "integerOptions": {
    object (IntegerOptions)
  },
  "dateOptions": {
    object (DateOptions)
  },
  "selectionOptions": {
    object (SelectionOptions)
  },
  "userOptions": {
    object (UserOptions)
  }
  // End of list of possible types for union field type_options.
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. إنّ جذر type_options ضمني ولا يجب تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

id

string

مطلوبة. الحقل المطلوب تحديثه.

حقل الاتحاد type_options

يمكن أن يكون الحقل "type_options" واحدًا فقط مما يلي:

textOptions

object (TextOptions)

تعديل الحقل إلى "نص"

longTextOptions

object (LongTextOptions)

تعديل الحقل إلى نص طويل

integerOptions

object (IntegerOptions)

يُرجى تعديل الحقل إلى عدد صحيح.

dateOptions

object (DateOptions)

تعديل الحقل إلى "التاريخ".

selectionOptions

object (SelectionOptions)

تعديل الحقل إلى "الاختيار".

userOptions

object (UserOptions)

تعديل الحقل إلى "المستخدم".

LongTextOptions

خيارات نوع الحقل "نص طويل".

تمثيل JSON
{
  "minLength": integer,
  "maxLength": integer
}
الحقول
minLength

integer

النتائج فقط. تمثّل هذه السمة الحد الأدنى لطول القيم الصالحة في حقل النص.

maxLength

integer

النتائج فقط. الحد الأقصى لطول القيم الصالحة لحقل النص.

EnableFieldRequest

اطلب تفعيل الحقل.

تمثيل JSON
{
  "id": string
}
الحقول
id

string

مطلوبة. رقم تعريف الحقل المطلوب تفعيله.

DisableFieldRequest

اطلب إيقاف الحقل.

تمثيل JSON
{
  "updateMask": string,
  "id": string,
  "disabledPolicy": {
    object (DisabledPolicy)
  }
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. الجذر disabledPolicy ضمني ويجب عدم تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

id

string

مطلوبة. مفتاح الحقل الذي تريد إيقافه.

disabledPolicy

object (DisabledPolicy)

مطلوبة. سياسة إيقاف الحقل

DeleteFieldRequest

طلب حذف الحقل.

تمثيل JSON
{
  "id": string
}
الحقول
id

string

مطلوبة. رقم تعريف الحقل المطلوب حذفه.

CreateSelectionChoiceRequest

اطلب إنشاء أحد خيارات الاختيار.

تمثيل JSON
{
  "fieldId": string,
  "choice": {
    object (Choice)
  }
}
الحقول
fieldId

string

مطلوبة. حقل الاختيار الذي سيتم فيه إنشاء "اختيار"

choice

object (Choice)

مطلوبة. اختيار إنشاء المحتوى

UpdateSelectionChoicePropertiesRequest

يمكنك طلب تعديل أحد المواقع الإلكترونية التي اختَرتها.

تمثيل JSON
{
  "updateMask": string,
  "fieldId": string,
  "id": string,
  "properties": {
    object (Properties)
  }
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. الجذر properties ضمني ويجب عدم تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

fieldId

string

مطلوبة. حقل التحديد المطلوب تعديله.

id

string

مطلوبة. خيار تحديث التطبيق:

properties

object (Properties)

مطلوبة. سمات "الاختيار" المطلوب تعديلها

EnableSelectionChoiceRequest

طلب تفعيل "اختيار"

تمثيل JSON
{
  "fieldId": string,
  "id": string
}
الحقول
fieldId

string

مطلوبة. حقل "التحديد" الذي سيتم فيه تفعيل "اختيار".

id

string

مطلوبة. انقر على خيار التفعيل.

DisableSelectionChoiceRequest

طلب إيقاف "اختيار"

تمثيل JSON
{
  "updateMask": string,
  "fieldId": string,
  "id": string,
  "disabledPolicy": {
    object (DisabledPolicy)
  }
}
الحقول
updateMask

string (FieldMask format)

الحقول التي يجب تعديلها. يجب تحديد حقل واحد على الأقل. الجذر disabledPolicy ضمني ويجب عدم تحديده. يمكن استخدام * واحد كاختصار لتعديل كل حقل.

fieldId

string

مطلوبة. حقل الاختيار الذي سيتم فيه إيقاف "اختيار".

id

string

مطلوبة. خيار الإيقاف.

disabledPolicy

object (DisabledPolicy)

مطلوبة. السياسة غير المفعّلة التي سيتم تعديلها.

DeleteSelectionChoiceRequest

طلب حذف اختيار

تمثيل JSON
{
  "fieldId": string,
  "id": string
}
الحقول
fieldId

string

مطلوبة. حقل الاختيار الذي سيتم حذف اختيار منه.

id

string

مطلوبة. خيار الحذف.

الإجابة

رد واحد من التحديث.

تمثيل JSON
{

  // Union field response can be only one of the following:
  "updateLabel": {
    object (UpdateLabelPropertiesResponse)
  },
  "createField": {
    object (CreateFieldResponse)
  },
  "updateField": {
    object (UpdateFieldPropertiesResponse)
  },
  "updateFieldType": {
    object (UpdateFieldTypeResponse)
  },
  "enableField": {
    object (EnableFieldResponse)
  },
  "disableField": {
    object (DisableFieldResponse)
  },
  "deleteField": {
    object (DeleteFieldResponse)
  },
  "createSelectionChoice": {
    object (CreateSelectionChoiceResponse)
  },
  "updateSelectionChoiceProperties": {
    object (UpdateSelectionChoicePropertiesResponse)
  },
  "enableSelectionChoice": {
    object (EnableSelectionChoiceResponse)
  },
  "disableSelectionChoice": {
    object (DisableSelectionChoiceResponse)
  },
  "deleteSelectionChoice": {
    object (DeleteSelectionChoiceResponse)
  }
  // End of list of possible types for union field response.
}
الحقول
حقل الاتحاد response الاستجابة للطلب المقابل. يمكن أن يكون الحقل "response" واحدًا فقط مما يلي:
updateLabel

object (UpdateLabelPropertiesResponse)

تم تعديل السمات الأساسية لأحد التصنيفات.

createField

object (CreateFieldResponse)

تنشئ حقلاً جديدًا.

updateField

object (UpdateFieldPropertiesResponse)

تحديث الخصائص الأساسية للحقل.

updateFieldType

object (UpdateFieldTypeResponse)

تعديل نوع الحقل و/أو خيارات النوع.

enableField

object (EnableFieldResponse)

يؤدي هذا الإجراء إلى تفعيل الحقل.

disableField

object (DisableFieldResponse)

لإيقاف الحقل.

deleteField

object (DeleteFieldResponse)

لحذف حقل من التصنيف.

createSelectionChoice

object (CreateSelectionChoiceResponse)

تعمل هذه السياسة على إنشاء خيار جديد في قائمة الاختيار لإضافته إلى "حقل تحديد".

updateSelectionChoiceProperties

object (UpdateSelectionChoicePropertiesResponse)

لتعديل اختيار ضمن حقل التحديد

enableSelectionChoice

object (EnableSelectionChoiceResponse)

لتفعيل خيار داخل حقل التحديد.

disableSelectionChoice

object (DisableSelectionChoiceResponse)

لإيقاف اختيار داخل حقل التحديد.

deleteSelectionChoice

object (DeleteSelectionChoiceResponse)

لحذف اختيار من حقل التحديد.

UpdateLabelPropertiesResponse

الرد بعد التعديل على خصائص التصنيف.

CreateFieldResponse

تم إنشاء رد بعد إنشاء الحقل.

تمثيل JSON
{
  "id": string,
  "priority": integer
}
الحقول
id

string

الحقل الخاص بالحقل الذي تم إنشاؤه. عند ترك هذا الحقل فارغًا في طلب إنشاء، سيتم إنشاء مفتاح تلقائيًا ويمكن تحديده هنا.

priority

integer

أولوية الحقل الذي تم إنشاؤه قد تتغير الأولوية عما تم تحديده لضمان أولويات متجاورة بين الحقول (1-n).

UpdateFieldPropertiesResponse

الرد بعد التعديل على المواقع الإلكترونية في الحقل

تمثيل JSON
{
  "priority": integer
}
الحقول
priority

integer

أولوية الحقل المعدَّل. قد تتغير الأولوية عما تم تحديده لضمان أولويات متجاورة بين الحقول (1-n).

UpdateFieldTypeResponse

الرد بعد التعديل على نوع الحقل.

EnableFieldResponse

تفعيل الحقل التالي للاستجابة

DisableFieldResponse

تم إيقاف الحقل التالي للاستجابة.

DeleteFieldResponse

الرد التالي لحذف الحقل:

CreateSelectionChoiceResponse

تم إنشاء الرد بعد إنشاء خيار الاختيار.

تمثيل JSON
{
  "fieldId": string,
  "id": string
}
الحقول
fieldId

string

المعرّف الذي أنشأه الخادم للحقل.

id

string

المعرف الذي ينشئه الخادم للخيار الذي تم إنشاؤه داخل الحقل

UpdateSelectionChoicePropertiesResponse

رد بعد التعديل على سمات "اختيار الاختيار".

تمثيل JSON
{
  "priority": integer
}
الحقول
priority

integer

أولوية الخيار المعدّل. قد تتغير الأولوية عما تم تحديده لضمان أولويات متعارضة بين الخيارات (1-n).

EnableSelectionChoiceResponse

تم تفعيل الرد بعد تفعيل الاختيار.

DisableSelectionChoiceResponse

تم إيقاف الرد التالي "الاختيار".

DeleteSelectionChoiceResponse

الرد بعد حذف الاختيار.