Class: Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb

Defined Under Namespace

Classes: GlobalIP, GlobalIPAssignment, Received, Transmitted

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(amount: nil, unit: nil) ⇒ Object

Parameters:

  • amount (Float) (defaults to: nil)

    The amount of data received.

  • unit (String) (defaults to: nil)

    The unit of the amount of data received.



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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 16

class Data < Telnyx::Internal::Type::BaseModel
  # @!attribute global_ip
  #
  #   @return [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIP, nil]
  optional :global_ip, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIP }

  # @!attribute global_ip_assignment
  #
  #   @return [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment, nil]
  optional :global_ip_assignment,
           -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment }

  # @!attribute received
  #
  #   @return [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Received, nil]
  optional :received, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Received }

  # @!attribute timestamp
  #   The timestamp of the metric.
  #
  #   @return [Time, nil]
  optional :timestamp, Time

  # @!attribute transmitted
  #
  #   @return [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Transmitted, nil]
  optional :transmitted, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Transmitted }

  # @!method initialize(global_ip: nil, global_ip_assignment: nil, received: nil, timestamp: nil, transmitted: nil)
  #   @param global_ip [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIP]
  #
  #   @param global_ip_assignment [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment]
  #
  #   @param received [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Received]
  #
  #   @param timestamp [Time] The timestamp of the metric.
  #
  #   @param transmitted [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Transmitted]

  # @see Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data#global_ip
  class GlobalIP < Telnyx::Internal::Type::BaseModel
    # @!attribute id
    #   Global IP ID.
    #
    #   @return [String, nil]
    optional :id, String

    response_only do
      # @!attribute ip_address
      #   The Global IP address.
      #
      #   @return [String, nil]
      optional :ip_address, String
    end

    # @!method initialize(id: nil, ip_address: nil)
    #   @param id [String] Global IP ID.
    #
    #   @param ip_address [String] The Global IP address.
  end

  # @see Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data#global_ip_assignment
  class GlobalIPAssignment < Telnyx::Internal::Type::BaseModel
    # @!attribute id
    #   Global IP assignment ID.
    #
    #   @return [String, nil]
    optional :id, String

    # @!attribute wireguard_peer
    #
    #   @return [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment::WireguardPeer, nil]
    optional :wireguard_peer,
             -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment::WireguardPeer }

    # @!attribute wireguard_peer_id
    #   Wireguard peer ID.
    #
    #   @return [String, nil]
    optional :wireguard_peer_id, String

    # @!method initialize(id: nil, wireguard_peer: nil, wireguard_peer_id: nil)
    #   @param id [String] Global IP assignment ID.
    #
    #   @param wireguard_peer [Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment::WireguardPeer]
    #
    #   @param wireguard_peer_id [String] Wireguard peer ID.

    # @see Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment#wireguard_peer
    class WireguardPeer < Telnyx::Internal::Type::BaseModel
      # @!attribute ip_address
      #   The IP address of the interface.
      #
      #   @return [String, nil]
      optional :ip_address, String

      # @!attribute name
      #   A user specified name for the interface.
      #
      #   @return [String, nil]
      optional :name, String

      # @!method initialize(ip_address: nil, name: nil)
      #   @param ip_address [String] The IP address of the interface.
      #
      #   @param name [String] A user specified name for the interface.
    end
  end

  # @see Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data#received
  class Received < Telnyx::Internal::Type::BaseModel
    # @!attribute amount
    #   The amount of data received.
    #
    #   @return [Float, nil]
    optional :amount, Float

    # @!attribute unit
    #   The unit of the amount of data received.
    #
    #   @return [String, nil]
    optional :unit, String

    # @!method initialize(amount: nil, unit: nil)
    #   @param amount [Float] The amount of data received.
    #
    #   @param unit [String] The unit of the amount of data received.
  end

  # @see Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data#transmitted
  class Transmitted < Telnyx::Internal::Type::BaseModel
    # @!attribute amount
    #   The amount of data transmitted.
    #
    #   @return [Float, nil]
    optional :amount, Float

    # @!attribute unit
    #   The unit of the amount of data transmitted.
    #
    #   @return [String, nil]
    optional :unit, String

    # @!method initialize(amount: nil, unit: nil)
    #   @param amount [Float] The amount of data transmitted.
    #
    #   @param unit [String] The unit of the amount of data transmitted.
  end
end

Instance Attribute Details

#global_ipTelnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIP?



20
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 20

optional :global_ip, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIP }

#global_ip_assignmentTelnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment?



25
26
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 25

optional :global_ip_assignment,
-> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::GlobalIPAssignment }

#receivedTelnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Received?



31
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 31

optional :received, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Received }

#timestampTime?

The timestamp of the metric.

Returns:

  • (Time, nil)


37
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 37

optional :timestamp, Time

#transmittedTelnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Transmitted?



42
# File 'lib/telnyx/models/global_ip_assignments_usage_retrieve_response.rb', line 42

optional :transmitted, -> { Telnyx::Models::GlobalIPAssignmentsUsageRetrieveResponse::Data::Transmitted }