File: resource_status.go

package info (click to toggle)
golang-github-microsoft-dev-tunnels 0.0.25-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,988 kB
  • sloc: cs: 9,969; java: 2,767; javascript: 328; xml: 186; makefile: 5
file content (45 lines) | stat: -rw-r--r-- 1,552 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ResourceStatus.cs

package tunnels

// Current value and limit for a limited resource related to a tunnel or tunnel port.
type ResourceStatus struct {
	// Gets or sets the current value.
	Current     uint64 `json:"current"`

	// Gets or sets the limit enforced by the service, or null if there is no limit.
	//
	// Any requests that would cause the limit to be exceeded may be denied by the service.
	// For HTTP requests, the response is generally a 403 Forbidden status, with details
	// about the limit in the response body.
	Limit       uint64 `json:"limit,omitempty"`

	// Gets or sets an optional source of the `ResourceStatus.Limit`, or null if there is no
	// limit.
	LimitSource string `json:"limitSource,omitempty"`

	RateStatus
}

// Current value and limit information for a rate-limited operation related to a tunnel or
// port.
type RateStatus struct {
	// Gets or sets the length of each period, in seconds, over which the rate is measured.
	//
	// For rates that are limited by month (or billing period), this value may represent an
	// estimate, since the actual duration may vary by the calendar.
	PeriodSeconds uint32 `json:"periodSeconds,omitempty"`

	// Gets or sets the unix time in seconds when this status will be reset.
	ResetTime     int64 `json:"resetTime,omitempty"`

	NamedRateStatus
}

// A named `RateStatus`.
type NamedRateStatus struct {
	// The name of the rate status.
	Name string `json:"name"`
}