Class: Telnyx::Models::GlobalIPUsageRetrieveResponse::Data

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

Defined Under Namespace

Classes: GlobalIP, 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
# File 'lib/telnyx/models/global_ip_usage_retrieve_response.rb', line 16

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

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

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

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

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

  # @see Telnyx::Models::GlobalIPUsageRetrieveResponse::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::GlobalIPUsageRetrieveResponse::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::GlobalIPUsageRetrieveResponse::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::GlobalIPUsageRetrieveResponse::Data::GlobalIP?



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

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

#receivedTelnyx::Models::GlobalIPUsageRetrieveResponse::Data::Received?



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

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

#timestampTime?

The timestamp of the metric.

Returns:

  • (Time, nil)


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

optional :timestamp, Time

#transmittedTelnyx::Models::GlobalIPUsageRetrieveResponse::Data::Transmitted?



36
# File 'lib/telnyx/models/global_ip_usage_retrieve_response.rb', line 36

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