Exemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Id = input.ReadString();
                    break;
                }

                case 18: {
                    FolderId = input.ReadString();
                    break;
                }

                case 26: {
                    if (createdAt_ == null)
                    {
                        CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreatedAt);
                    break;
                }

                case 34: {
                    Name = input.ReadString();
                    break;
                }

                case 42: {
                    Description = input.ReadString();
                    break;
                }

                case 50: {
                    labels_.AddEntriesFrom(input, _map_labels_codec);
                    break;
                }

                case 56: {
                    Status = (global::Yandex.Cloud.Kms.V1.SymmetricKey.Types.Status)input.ReadEnum();
                    break;
                }

                case 66: {
                    if (primaryVersion_ == null)
                    {
                        PrimaryVersion = new global::Yandex.Cloud.Kms.V1.SymmetricKeyVersion();
                    }
                    input.ReadMessage(PrimaryVersion);
                    break;
                }

                case 72: {
                    DefaultAlgorithm = (global::Yandex.Cloud.Kms.V1.SymmetricAlgorithm)input.ReadEnum();
                    break;
                }

                case 82: {
                    if (rotatedAt_ == null)
                    {
                        RotatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(RotatedAt);
                    break;
                }

                case 90: {
                    if (rotationPeriod_ == null)
                    {
                        RotationPeriod = new global::Google.Protobuf.WellKnownTypes.Duration();
                    }
                    input.ReadMessage(RotationPeriod);
                    break;
                }

                case 96: {
                    DeletionProtection = input.ReadBool();
                    break;
                }
                }
            }
        }
Exemplo n.º 2
0
 public void MergeFrom(SymmetricKey other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.FolderId.Length != 0)
     {
         FolderId = other.FolderId;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     labels_.Add(other.labels_);
     if (other.Status != global::Yandex.Cloud.Kms.V1.SymmetricKey.Types.Status.Unspecified)
     {
         Status = other.Status;
     }
     if (other.primaryVersion_ != null)
     {
         if (primaryVersion_ == null)
         {
             PrimaryVersion = new global::Yandex.Cloud.Kms.V1.SymmetricKeyVersion();
         }
         PrimaryVersion.MergeFrom(other.PrimaryVersion);
     }
     if (other.DefaultAlgorithm != global::Yandex.Cloud.Kms.V1.SymmetricAlgorithm.Unspecified)
     {
         DefaultAlgorithm = other.DefaultAlgorithm;
     }
     if (other.rotatedAt_ != null)
     {
         if (rotatedAt_ == null)
         {
             RotatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         RotatedAt.MergeFrom(other.RotatedAt);
     }
     if (other.rotationPeriod_ != null)
     {
         if (rotationPeriod_ == null)
         {
             RotationPeriod = new global::Google.Protobuf.WellKnownTypes.Duration();
         }
         RotationPeriod.MergeFrom(other.RotationPeriod);
     }
     if (other.DeletionProtection != false)
     {
         DeletionProtection = other.DeletionProtection;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }