Esempio n. 1
0
        public void MergeFrom(Constraint other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.DisplayName.Length != 0)
            {
                DisplayName = other.DisplayName;
            }
            if (other.Description.Length != 0)
            {
                Description = other.Description;
            }
            if (other.ConstraintDefault != global::Google.Cloud.OrgPolicy.V2.Constraint.Types.ConstraintDefault.Unspecified)
            {
                ConstraintDefault = other.ConstraintDefault;
            }
            switch (other.ConstraintTypeCase)
            {
            case ConstraintTypeOneofCase.ListConstraint:
                if (ListConstraint == null)
                {
                    ListConstraint = new global::Google.Cloud.OrgPolicy.V2.Constraint.Types.ListConstraint();
                }
                ListConstraint.MergeFrom(other.ListConstraint);
                break;

            case ConstraintTypeOneofCase.BooleanConstraint:
                if (BooleanConstraint == null)
                {
                    BooleanConstraint = new global::Google.Cloud.OrgPolicy.V2.Constraint.Types.BooleanConstraint();
                }
                BooleanConstraint.MergeFrom(other.BooleanConstraint);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }