diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
index e7e9bd5..048fb61 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
@@ -54,7 +54,7 @@ class Field extends ConfigEntityBase implements FieldInterface {
    *
    * @var string
    */
-  public $id;
+  protected $id;
 
   /**
    * The field UUID.
@@ -63,7 +63,7 @@ class Field extends ConfigEntityBase implements FieldInterface {
    *
    * @var string
    */
-  public $uuid;
+  protected $uuid;
 
   /**
    * The field type.
@@ -81,14 +81,14 @@ class Field extends ConfigEntityBase implements FieldInterface {
    *
    * @var string
    */
-  public $module;
+  protected $module;
 
   /**
    * Flag indicating whether the field type module is enabled.
    *
    * @var bool
    */
-  public $active;
+  protected $active;
 
   /**
    * Field-type specific settings.
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
index 53132ec..f970164 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
@@ -42,7 +42,7 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface {
    *
    * @var string
    */
-  public $id;
+  protected $id;
 
   /**
    * The instance UUID.
@@ -51,28 +51,28 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface {
    *
    * @var string
    */
-  public $uuid;
+  protected $uuid;
 
   /**
    * The UUID of the field attached to the bundle by this instance.
    *
    * @var string
    */
-  public $field_uuid;
+  protected $field_uuid;
 
   /**
    * The name of the entity type the instance is attached to.
    *
    * @var string
    */
-  public $entity_type;
+  protected $entity_type;
 
   /**
    * The name of the bundle the instance is attached to.
    *
    * @var string
    */
-  public $bundle;
+  protected $bundle;
 
   /**
    * The human-readable label for the instance.
