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

تمثّل هذه السمة رمز اللغة المستخدَمة في تقييم تصنيفات الحقول المترجَمة عندما تكون قيمة include_label_in_response هي true.

نص الاستجابة

ردّ على طلب تعديل التصنيف

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

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

object (Response)

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

updatedLabel

object (Label)

التصنيف بعد تطبيق التعديلات يتم ضبط هذا الحقل فقط إذا كانت قيمة 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)
  },
  "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)

عدِّل الحقل إلى "نص".

integerOptions

object (IntegerOptions)

عدِّل الحقل إلى "عدد صحيح".

dateOptions

object (DateOptions)

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

selectionOptions

object (SelectionOptions)

عدِّل الحقل إلى "التحديد".

userOptions

object (UserOptions)

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

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

لا يتضمّن هذا النوع أي حقول.

الردّ بعد حذف الخيار