Class: Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb

Defined Under Namespace

Classes: Category, Total

Instance Attribute Summary collapse

Class Method 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(data: nil) ⇒ Object

Parameters:



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
# File 'lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb', line 18

class Data < Telnyx::Internal::Type::BaseModel
  # @!attribute categories
  #
  #   @return [Array<Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category>, nil]
  optional :categories,
           -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category] }

  # @!attribute timestamp
  #   The time the usage was recorded
  #
  #   @return [Time, nil]
  optional :timestamp, Time

  # @!attribute total
  #
  #   @return [Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Total, nil]
  optional :total, -> { Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Total }

  # @!method initialize(categories: nil, timestamp: nil, total: nil)
  #   @param categories [Array<Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category>]
  #
  #   @param timestamp [Time] The time the usage was recorded
  #
  #   @param total [Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Total]

  class Category < Telnyx::Internal::Type::BaseModel
    # @!attribute bytes_received
    #   The number of bytes received
    #
    #   @return [Integer, nil]
    optional :bytes_received, Integer

    # @!attribute bytes_sent
    #   The number of bytes sent
    #
    #   @return [Integer, nil]
    optional :bytes_sent, Integer

    # @!attribute category
    #   The category of the bucket operation
    #
    #   @return [Symbol, Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category::Category, nil]
    optional :category,
             enum: -> { Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category::Category }

    # @!attribute ops
    #   The number of operations
    #
    #   @return [Integer, nil]
    optional :ops, Integer

    # @!attribute successful_ops
    #   The number of successful operations
    #
    #   @return [Integer, nil]
    optional :successful_ops, Integer

    # @!method initialize(bytes_received: nil, bytes_sent: nil, category: nil, ops: nil, successful_ops: nil)
    #   @param bytes_received [Integer] The number of bytes received
    #
    #   @param bytes_sent [Integer] The number of bytes sent
    #
    #   @param category [Symbol, Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category::Category] The category of the bucket operation
    #
    #   @param ops [Integer] The number of operations
    #
    #   @param successful_ops [Integer] The number of successful operations

    # The category of the bucket operation
    #
    # @see Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category#category
    module Category
      extend Telnyx::Internal::Type::Enum

      LIST_BUCKET = :list_bucket
      LIST_BUCKETS = :list_buckets
      GET_BUCKET_LOCATION = :"get-bucket_location"
      CREATE_BUCKET = :create_bucket
      STAT_BUCKET = :stat_bucket
      GET_BUCKET_VERSIONING = :get_bucket_versioning
      SET_BUCKET_VERSIONING = :set_bucket_versioning
      GET_OBJ = :get_obj
      PUT_OBJ = :put_obj
      DELETE_OBJ = :delete_obj

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # @see Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data#total
  class Total < Telnyx::Internal::Type::BaseModel
    # @!attribute bytes_received
    #   The number of bytes received
    #
    #   @return [Integer, nil]
    optional :bytes_received, Integer

    # @!attribute bytes_sent
    #   The number of bytes sent
    #
    #   @return [Integer, nil]
    optional :bytes_sent, Integer

    # @!attribute ops
    #   The number of operations
    #
    #   @return [Integer, nil]
    optional :ops, Integer

    # @!attribute successful_ops
    #   The number of successful operations
    #
    #   @return [Integer, nil]
    optional :successful_ops, Integer

    # @!method initialize(bytes_received: nil, bytes_sent: nil, ops: nil, successful_ops: nil)
    #   @param bytes_received [Integer] The number of bytes received
    #
    #   @param bytes_sent [Integer] The number of bytes sent
    #
    #   @param ops [Integer] The number of operations
    #
    #   @param successful_ops [Integer] The number of successful operations
  end
end

Instance Attribute Details

#categoriesArray<Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category>?



22
23
# File 'lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb', line 22

optional :categories,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Category] }

#timestampTime?

The time the usage was recorded

Returns:

  • (Time, nil)


29
# File 'lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb', line 29

optional :timestamp, Time

#totalTelnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Total?



34
# File 'lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb', line 34

optional :total, -> { Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse::Data::Total }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/storage/buckets/usage_get_api_usage_response.rb', line 103