public void MergeFrom(CryptoKey other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.primary_ != null) { if (primary_ == null) { primary_ = new global::Google.Cloud.Kms.V1.CryptoKeyVersion(); } Primary.MergeFrom(other.Primary); } if (other.Purpose != 0) { Purpose = other.Purpose; } if (other.createTime_ != null) { if (createTime_ == null) { createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.nextRotationTime_ != null) { if (nextRotationTime_ == null) { nextRotationTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } NextRotationTime.MergeFrom(other.NextRotationTime); } labels_.Add(other.labels_); switch (other.RotationScheduleCase) { case RotationScheduleOneofCase.RotationPeriod: if (RotationPeriod == null) { RotationPeriod = new global::Google.Protobuf.WellKnownTypes.Duration(); } RotationPeriod.MergeFrom(other.RotationPeriod); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (primary_ != null) { hash ^= Primary.GetHashCode(); } if (Purpose != 0) { hash ^= Purpose.GetHashCode(); } if (createTime_ != null) { hash ^= CreateTime.GetHashCode(); } if (nextRotationTime_ != null) { hash ^= NextRotationTime.GetHashCode(); } if (rotationScheduleCase_ == RotationScheduleOneofCase.RotationPeriod) { hash ^= RotationPeriod.GetHashCode(); } hash ^= Labels.GetHashCode(); hash ^= (int)rotationScheduleCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }