Ejemplo n.º 1
0
 public void MergeFrom(TimeSeries other)
 {
     if (other == null)
     {
         return;
     }
     if (other.metric_ != null)
     {
         if (metric_ == null)
         {
             metric_ = new global::Google.Api.Metric();
         }
         Metric.MergeFrom(other.Metric);
     }
     if (other.resource_ != null)
     {
         if (resource_ == null)
         {
             resource_ = new global::Google.Api.MonitoredResource();
         }
         Resource.MergeFrom(other.Resource);
     }
     if (other.MetricKind != 0)
     {
         MetricKind = other.MetricKind;
     }
     if (other.ValueType != 0)
     {
         ValueType = other.ValueType;
     }
     points_.Add(other.points_);
 }
Ejemplo n.º 2
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: {
                    if (metric_ == null)
                    {
                        metric_ = new global::Google.Api.Metric();
                    }
                    input.ReadMessage(metric_);
                    break;
                }

                case 18: {
                    if (resource_ == null)
                    {
                        resource_ = new global::Google.Api.MonitoredResource();
                    }
                    input.ReadMessage(resource_);
                    break;
                }

                case 24: {
                    metricKind_ = (global::Google.Api.MetricDescriptor.Types.MetricKind)input.ReadEnum();
                    break;
                }

                case 32: {
                    valueType_ = (global::Google.Api.MetricDescriptor.Types.ValueType)input.ReadEnum();
                    break;
                }

                case 42: {
                    points_.AddEntriesFrom(input, _repeated_points_codec);
                    break;
                }

                case 58: {
                    if (metadata_ == null)
                    {
                        metadata_ = new global::Google.Api.MonitoredResourceMetadata();
                    }
                    input.ReadMessage(metadata_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 3
0
 public void MergeFrom(TimeSeries other)
 {
     if (other == null)
     {
         return;
     }
     if (other.metric_ != null)
     {
         if (metric_ == null)
         {
             metric_ = new global::Google.Api.Metric();
         }
         Metric.MergeFrom(other.Metric);
     }
     if (other.resource_ != null)
     {
         if (resource_ == null)
         {
             resource_ = new global::Google.Api.MonitoredResource();
         }
         Resource.MergeFrom(other.Resource);
     }
     if (other.metadata_ != null)
     {
         if (metadata_ == null)
         {
             metadata_ = new global::Google.Api.MonitoredResourceMetadata();
         }
         Metadata.MergeFrom(other.Metadata);
     }
     if (other.MetricKind != 0)
     {
         MetricKind = other.MetricKind;
     }
     if (other.ValueType != 0)
     {
         ValueType = other.ValueType;
     }
     points_.Add(other.points_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }