public void MergeFrom(Model other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.DisplayName.Length != 0) { DisplayName = other.DisplayName; } if (other.DatasetId.Length != 0) { DatasetId = other.DatasetId; } if (other.createTime_ != null) { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.updateTime_ != null) { if (updateTime_ == null) { UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } UpdateTime.MergeFrom(other.UpdateTime); } if (other.DeploymentState != 0) { DeploymentState = other.DeploymentState; } labels_.Add(other.labels_); switch (other.ModelMetadataCase) { case ModelMetadataOneofCase.TranslationModelMetadata: if (TranslationModelMetadata == null) { TranslationModelMetadata = new global::Google.Cloud.AutoML.V1.TranslationModelMetadata(); } TranslationModelMetadata.MergeFrom(other.TranslationModelMetadata); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(Model other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.DisplayName.Length != 0) { DisplayName = other.DisplayName; } if (other.DatasetId.Length != 0) { DatasetId = other.DatasetId; } if (other.createTime_ != null) { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.updateTime_ != null) { if (updateTime_ == null) { UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } UpdateTime.MergeFrom(other.UpdateTime); } if (other.DeploymentState != global::Google.Cloud.AutoML.V1.Model.Types.DeploymentState.Unspecified) { DeploymentState = other.DeploymentState; } if (other.Etag.Length != 0) { Etag = other.Etag; } labels_.Add(other.labels_); switch (other.ModelMetadataCase) { case ModelMetadataOneofCase.TranslationModelMetadata: if (TranslationModelMetadata == null) { TranslationModelMetadata = new global::Google.Cloud.AutoML.V1.TranslationModelMetadata(); } TranslationModelMetadata.MergeFrom(other.TranslationModelMetadata); break; case ModelMetadataOneofCase.ImageClassificationModelMetadata: if (ImageClassificationModelMetadata == null) { ImageClassificationModelMetadata = new global::Google.Cloud.AutoML.V1.ImageClassificationModelMetadata(); } ImageClassificationModelMetadata.MergeFrom(other.ImageClassificationModelMetadata); break; case ModelMetadataOneofCase.TextClassificationModelMetadata: if (TextClassificationModelMetadata == null) { TextClassificationModelMetadata = new global::Google.Cloud.AutoML.V1.TextClassificationModelMetadata(); } TextClassificationModelMetadata.MergeFrom(other.TextClassificationModelMetadata); break; case ModelMetadataOneofCase.ImageObjectDetectionModelMetadata: if (ImageObjectDetectionModelMetadata == null) { ImageObjectDetectionModelMetadata = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionModelMetadata(); } ImageObjectDetectionModelMetadata.MergeFrom(other.ImageObjectDetectionModelMetadata); break; case ModelMetadataOneofCase.TextExtractionModelMetadata: if (TextExtractionModelMetadata == null) { TextExtractionModelMetadata = new global::Google.Cloud.AutoML.V1.TextExtractionModelMetadata(); } TextExtractionModelMetadata.MergeFrom(other.TextExtractionModelMetadata); break; case ModelMetadataOneofCase.TextSentimentModelMetadata: if (TextSentimentModelMetadata == null) { TextSentimentModelMetadata = new global::Google.Cloud.AutoML.V1.TextSentimentModelMetadata(); } TextSentimentModelMetadata.MergeFrom(other.TextSentimentModelMetadata); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }