Example #1
0
 public void MergeFrom(HyperparameterTuningJob other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.DisplayName.Length != 0)
     {
         DisplayName = other.DisplayName;
     }
     if (other.studySpec_ != null)
     {
         if (studySpec_ == null)
         {
             StudySpec = new global::Google.Cloud.AIPlatform.V1.StudySpec();
         }
         StudySpec.MergeFrom(other.StudySpec);
     }
     if (other.MaxTrialCount != 0)
     {
         MaxTrialCount = other.MaxTrialCount;
     }
     if (other.ParallelTrialCount != 0)
     {
         ParallelTrialCount = other.ParallelTrialCount;
     }
     if (other.MaxFailedTrialCount != 0)
     {
         MaxFailedTrialCount = other.MaxFailedTrialCount;
     }
     if (other.trialJobSpec_ != null)
     {
         if (trialJobSpec_ == null)
         {
             TrialJobSpec = new global::Google.Cloud.AIPlatform.V1.CustomJobSpec();
         }
         TrialJobSpec.MergeFrom(other.TrialJobSpec);
     }
     trials_.Add(other.trials_);
     if (other.State != global::Google.Cloud.AIPlatform.V1.JobState.Unspecified)
     {
         State = other.State;
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.startTime_ != null)
     {
         if (startTime_ == null)
         {
             StartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartTime.MergeFrom(other.StartTime);
     }
     if (other.endTime_ != null)
     {
         if (endTime_ == null)
         {
             EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EndTime.MergeFrom(other.EndTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.error_ != null)
     {
         if (error_ == null)
         {
             Error = new global::Google.Rpc.Status();
         }
         Error.MergeFrom(other.Error);
     }
     labels_.Add(other.labels_);
     if (other.encryptionSpec_ != null)
     {
         if (encryptionSpec_ == null)
         {
             EncryptionSpec = new global::Google.Cloud.AIPlatform.V1.EncryptionSpec();
         }
         EncryptionSpec.MergeFrom(other.EncryptionSpec);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (studySpec_ != null)
            {
                hash ^= StudySpec.GetHashCode();
            }
            if (MaxTrialCount != 0)
            {
                hash ^= MaxTrialCount.GetHashCode();
            }
            if (ParallelTrialCount != 0)
            {
                hash ^= ParallelTrialCount.GetHashCode();
            }
            if (MaxFailedTrialCount != 0)
            {
                hash ^= MaxFailedTrialCount.GetHashCode();
            }
            if (trialJobSpec_ != null)
            {
                hash ^= TrialJobSpec.GetHashCode();
            }
            hash ^= trials_.GetHashCode();
            if (State != global::Google.Cloud.AIPlatform.V1.JobState.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (error_ != null)
            {
                hash ^= Error.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (encryptionSpec_ != null)
            {
                hash ^= EncryptionSpec.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }