Example #1
0
 /// <summary>Snippet for GetLogMetric</summary>
 public void GetLogMetric()
 {
     // Snippet: GetLogMetric(MetricNameOneof,CallSettings)
     // Create client
     MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create();
     // Initialize request argument(s)
     MetricNameOneof metricName = MetricNameOneof.From(new MetricName("[PROJECT]", "[METRIC]"));
     // Make the request
     LogMetric response = metricsServiceV2Client.GetLogMetric(metricName);
     // End snippet
 }
Example #2
0
 /// <summary>Snippet for GetLogMetric</summary>
 public void GetLogMetric()
 {
     // Snippet: GetLogMetric(string, CallSettings)
     // Create client
     MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create();
     // Initialize request argument(s)
     string metricName = "projects/[PROJECT]/metrics/[METRIC]";
     // Make the request
     LogMetric response = metricsServiceV2Client.GetLogMetric(metricName);
     // End snippet
 }
Example #3
0
 /// <summary>Snippet for GetLogMetric</summary>
 public void GetLogMetricResourceNames()
 {
     // Snippet: GetLogMetric(LogMetricName, CallSettings)
     // Create client
     MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create();
     // Initialize request argument(s)
     LogMetricName metricName = LogMetricName.FromProjectMetric("[PROJECT]", "[METRIC]");
     // Make the request
     LogMetric response = metricsServiceV2Client.GetLogMetric(metricName);
     // End snippet
 }
 public void GetLogMetric()
 {
     // Snippet: GetLogMetric(string,CallSettings)
     // Create client
     MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create();
     // Initialize request argument(s)
     string formattedMetricName = MetricsServiceV2Client.FormatMetricName("[PROJECT]", "[METRIC]");
     // Make the request
     LogMetric response = metricsServiceV2Client.GetLogMetric(formattedMetricName);
     // End snippet
 }
Example #5
0
 /// <summary>Snippet for GetLogMetric</summary>
 public void GetLogMetric_RequestObject()
 {
     // Snippet: GetLogMetric(GetLogMetricRequest,CallSettings)
     // Create client
     MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create();
     // Initialize request argument(s)
     GetLogMetricRequest request = new GetLogMetricRequest
     {
         MetricNameAsMetricNameOneof = MetricNameOneof.From(new MetricName("[PROJECT]", "[METRIC]")),
     };
     // Make the request
     LogMetric response = metricsServiceV2Client.GetLogMetric(request);
     // End snippet
 }