license_manager 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +96 -0
- data/Rakefile +10 -0
- data/docs/ConnectStripe.md +18 -0
- data/docs/CreateCustomer.md +20 -0
- data/docs/CreateIntegrationMapping.md +20 -0
- data/docs/CreateLicense.md +36 -0
- data/docs/CreatePolicy.md +30 -0
- data/docs/CreatePortalLink.md +18 -0
- data/docs/CreateProduct.md +20 -0
- data/docs/CreateProductWithPolicy.md +24 -0
- data/docs/CreateRelease.md +20 -0
- data/docs/CreateToken.md +20 -0
- data/docs/Customer.md +30 -0
- data/docs/CustomerList.md +20 -0
- data/docs/CustomersApi.md +385 -0
- data/docs/Error.md +18 -0
- data/docs/ErrorError.md +22 -0
- data/docs/ErrorErrorIssuesInner.md +20 -0
- data/docs/ErrorErrorIssuesInnerPathInner.md +15 -0
- data/docs/Event.md +34 -0
- data/docs/EventActor.md +55 -0
- data/docs/EventActorOneOf.md +26 -0
- data/docs/EventActorOneOf1.md +24 -0
- data/docs/EventActorOneOf2.md +22 -0
- data/docs/EventActorOneOf3.md +18 -0
- data/docs/EventActorOneOf4.md +22 -0
- data/docs/EventList.md +20 -0
- data/docs/EventMachine.md +22 -0
- data/docs/EventType.md +15 -0
- data/docs/EventsApi.md +173 -0
- data/docs/FixedMaxVersion.md +20 -0
- data/docs/Integration.md +38 -0
- data/docs/IntegrationMapping.md +38 -0
- data/docs/IntegrationStatus.md +15 -0
- data/docs/IntegrationsApi.md +587 -0
- data/docs/License.md +50 -0
- data/docs/LicenseList.md +20 -0
- data/docs/LicenseMaxVersion.md +22 -0
- data/docs/LicenseMaxVersionInput.md +22 -0
- data/docs/LicenseStats.md +26 -0
- data/docs/LicenseStatsActivationsByMachineInner.md +24 -0
- data/docs/LicenseStatsActivationsByVersionInner.md +20 -0
- data/docs/LicenseStatus.md +15 -0
- data/docs/LicenseToken.md +18 -0
- data/docs/LicensesApi.md +817 -0
- data/docs/ListPolicyEventsTypeParameter.md +15 -0
- data/docs/ListStripePrices200Response.md +18 -0
- data/docs/LockMaxVersion.md +22 -0
- data/docs/LockMaxVersionMajorAfter.md +49 -0
- data/docs/LockMaxVersionMajorAfterOneOf.md +20 -0
- data/docs/LockMaxVersionMajorAfterOneOf1.md +20 -0
- data/docs/LockMaxVersionMinorAfter.md +20 -0
- data/docs/Machine.md +36 -0
- data/docs/MachineList.md +20 -0
- data/docs/MachinesApi.md +246 -0
- data/docs/Pagination.md +24 -0
- data/docs/PoliciesApi.md +388 -0
- data/docs/Policy.md +40 -0
- data/docs/PolicyDuration.md +20 -0
- data/docs/PolicyList.md +20 -0
- data/docs/PolicyMaxVersion.md +24 -0
- data/docs/PolicySettings.md +24 -0
- data/docs/PolicySettingsDuration.md +20 -0
- data/docs/PolicySettingsDurationAnyOf.md +20 -0
- data/docs/PolicySettingsDurationAnyOf1.md +20 -0
- data/docs/PolicySettingsMaxVersion.md +24 -0
- data/docs/Portal.md +30 -0
- data/docs/PortalApi.md +289 -0
- data/docs/PortalLink.md +22 -0
- data/docs/PortalNotFound.md +22 -0
- data/docs/PortalSettings.md +26 -0
- data/docs/Price.md +20 -0
- data/docs/PriceInput.md +20 -0
- data/docs/Product.md +32 -0
- data/docs/ProductList.md +20 -0
- data/docs/ProductStats.md +54 -0
- data/docs/ProductStatsActivationsByVersionInner.md +20 -0
- data/docs/ProductStatsActiveMachinesByPlatformInner.md +20 -0
- data/docs/ProductStatsActiveMachinesByVersionInner.md +20 -0
- data/docs/ProductStatsNewLicensesByPolicyInner.md +22 -0
- data/docs/ProductsApi.md +666 -0
- data/docs/Release.md +28 -0
- data/docs/ReleaseList.md +20 -0
- data/docs/ReleasesApi.md +388 -0
- data/docs/RequestPortalLink.md +20 -0
- data/docs/Revenue.md +34 -0
- data/docs/SendLicenseKeys.md +18 -0
- data/docs/SendPortalLink.md +18 -0
- data/docs/SigningKey.md +27 -0
- data/docs/StripeIntegration.md +26 -0
- data/docs/StripePermission.md +22 -0
- data/docs/StripePrice.md +28 -0
- data/docs/Token.md +24 -0
- data/docs/TokensApi.md +235 -0
- data/docs/UpdateCustomer.md +20 -0
- data/docs/UpdateIntegrationMapping.md +18 -0
- data/docs/UpdateLicense.md +28 -0
- data/docs/UpdatePolicy.md +30 -0
- data/docs/UpdateProduct.md +22 -0
- data/docs/UpdateProductPortal.md +26 -0
- data/docs/UpdateRelease.md +20 -0
- data/docs/ValidateKey.md +26 -0
- data/docs/ValidateKeyError.md +18 -0
- data/docs/ValidateKeyErrorError.md +24 -0
- data/git_push.sh +54 -0
- data/lib/license_manager/api/customers_api.rb +398 -0
- data/lib/license_manager/api/events_api.rb +207 -0
- data/lib/license_manager/api/integrations_api.rb +559 -0
- data/lib/license_manager/api/licenses_api.rb +885 -0
- data/lib/license_manager/api/machines_api.rb +257 -0
- data/lib/license_manager/api/policies_api.rb +412 -0
- data/lib/license_manager/api/portal_api.rb +310 -0
- data/lib/license_manager/api/products_api.rb +653 -0
- data/lib/license_manager/api/releases_api.rb +408 -0
- data/lib/license_manager/api/tokens_api.rb +244 -0
- data/lib/license_manager/api_client.rb +441 -0
- data/lib/license_manager/api_error.rb +58 -0
- data/lib/license_manager/api_model_base.rb +88 -0
- data/lib/license_manager/configuration.rb +400 -0
- data/lib/license_manager/models/connect_stripe.rb +187 -0
- data/lib/license_manager/models/create_customer.rb +222 -0
- data/lib/license_manager/models/create_integration_mapping.rb +222 -0
- data/lib/license_manager/models/create_license.rb +361 -0
- data/lib/license_manager/models/create_policy.rb +347 -0
- data/lib/license_manager/models/create_portal_link.rb +196 -0
- data/lib/license_manager/models/create_product.rb +244 -0
- data/lib/license_manager/models/create_product_with_policy.rb +270 -0
- data/lib/license_manager/models/create_release.rb +208 -0
- data/lib/license_manager/models/create_token.rb +237 -0
- data/lib/license_manager/models/customer.rb +308 -0
- data/lib/license_manager/models/customer_list.rb +206 -0
- data/lib/license_manager/models/error.rb +177 -0
- data/lib/license_manager/models/error_error.rb +215 -0
- data/lib/license_manager/models/error_error_issues_inner.rb +205 -0
- data/lib/license_manager/models/error_error_issues_inner_path_inner.rb +103 -0
- data/lib/license_manager/models/event.rb +340 -0
- data/lib/license_manager/models/event_actor.rb +108 -0
- data/lib/license_manager/models/event_actor_one_of.rb +251 -0
- data/lib/license_manager/models/event_actor_one_of1.rb +239 -0
- data/lib/license_manager/models/event_actor_one_of2.rb +257 -0
- data/lib/license_manager/models/event_actor_one_of3.rb +201 -0
- data/lib/license_manager/models/event_actor_one_of4.rb +243 -0
- data/lib/license_manager/models/event_list.rb +206 -0
- data/lib/license_manager/models/event_machine.rb +216 -0
- data/lib/license_manager/models/event_type.rb +46 -0
- data/lib/license_manager/models/fixed_max_version.rb +240 -0
- data/lib/license_manager/models/integration.rb +412 -0
- data/lib/license_manager/models/integration_mapping.rb +435 -0
- data/lib/license_manager/models/integration_status.rb +42 -0
- data/lib/license_manager/models/license.rb +542 -0
- data/lib/license_manager/models/license_list.rb +206 -0
- data/lib/license_manager/models/license_max_version.rb +208 -0
- data/lib/license_manager/models/license_max_version_input.rb +202 -0
- data/lib/license_manager/models/license_stats.rb +292 -0
- data/lib/license_manager/models/license_stats_activations_by_machine_inner.rb +244 -0
- data/lib/license_manager/models/license_stats_activations_by_version_inner.rb +206 -0
- data/lib/license_manager/models/license_status.rb +42 -0
- data/lib/license_manager/models/license_token.rb +178 -0
- data/lib/license_manager/models/list_policy_events_type_parameter.rb +104 -0
- data/lib/license_manager/models/list_stripe_prices200_response.rb +179 -0
- data/lib/license_manager/models/lock_max_version.rb +240 -0
- data/lib/license_manager/models/lock_max_version_major_after.rb +105 -0
- data/lib/license_manager/models/lock_max_version_major_after_one_of.rb +245 -0
- data/lib/license_manager/models/lock_max_version_major_after_one_of1.rb +246 -0
- data/lib/license_manager/models/lock_max_version_minor_after.rb +104 -0
- data/lib/license_manager/models/machine.rb +383 -0
- data/lib/license_manager/models/machine_list.rb +206 -0
- data/lib/license_manager/models/pagination.rb +260 -0
- data/lib/license_manager/models/policy.rb +425 -0
- data/lib/license_manager/models/policy_duration.rb +104 -0
- data/lib/license_manager/models/policy_list.rb +206 -0
- data/lib/license_manager/models/policy_max_version.rb +104 -0
- data/lib/license_manager/models/policy_settings.rb +244 -0
- data/lib/license_manager/models/policy_settings_duration.rb +104 -0
- data/lib/license_manager/models/policy_settings_duration_any_of.rb +245 -0
- data/lib/license_manager/models/policy_settings_duration_any_of1.rb +246 -0
- data/lib/license_manager/models/policy_settings_max_version.rb +104 -0
- data/lib/license_manager/models/portal.rb +281 -0
- data/lib/license_manager/models/portal_link.rb +232 -0
- data/lib/license_manager/models/portal_not_found.rb +204 -0
- data/lib/license_manager/models/portal_settings.rb +304 -0
- data/lib/license_manager/models/price.rb +206 -0
- data/lib/license_manager/models/price_input.rb +224 -0
- data/lib/license_manager/models/product.rb +333 -0
- data/lib/license_manager/models/product_list.rb +206 -0
- data/lib/license_manager/models/product_stats.rb +682 -0
- data/lib/license_manager/models/product_stats_activations_by_version_inner.rb +193 -0
- data/lib/license_manager/models/product_stats_active_machines_by_platform_inner.rb +190 -0
- data/lib/license_manager/models/product_stats_active_machines_by_version_inner.rb +190 -0
- data/lib/license_manager/models/product_stats_new_licenses_by_policy_inner.rb +235 -0
- data/lib/license_manager/models/release.rb +308 -0
- data/lib/license_manager/models/release_list.rb +206 -0
- data/lib/license_manager/models/request_portal_link.rb +216 -0
- data/lib/license_manager/models/revenue.rb +401 -0
- data/lib/license_manager/models/send_license_keys.rb +198 -0
- data/lib/license_manager/models/send_portal_link.rb +187 -0
- data/lib/license_manager/models/signing_key.rb +282 -0
- data/lib/license_manager/models/stripe_integration.rb +276 -0
- data/lib/license_manager/models/stripe_permission.rb +253 -0
- data/lib/license_manager/models/stripe_price.rb +280 -0
- data/lib/license_manager/models/token.rb +274 -0
- data/lib/license_manager/models/update_customer.rb +215 -0
- data/lib/license_manager/models/update_integration_mapping.rb +186 -0
- data/lib/license_manager/models/update_license.rb +268 -0
- data/lib/license_manager/models/update_policy.rb +340 -0
- data/lib/license_manager/models/update_product.rb +246 -0
- data/lib/license_manager/models/update_product_portal.rb +274 -0
- data/lib/license_manager/models/update_release.rb +201 -0
- data/lib/license_manager/models/validate_key.rb +362 -0
- data/lib/license_manager/models/validate_key_error.rb +177 -0
- data/lib/license_manager/models/validate_key_error_error.rb +226 -0
- data/lib/license_manager/version.rb +15 -0
- data/lib/license_manager.rb +142 -0
- data/license_manager.gemspec +41 -0
- data/openapi.json +9825 -0
- data/spec/api/customers_api_spec.rb +102 -0
- data/spec/api/events_api_spec.rb +68 -0
- data/spec/api/integrations_api_spec.rb +134 -0
- data/spec/api/licenses_api_spec.rb +200 -0
- data/spec/api/machines_api_spec.rb +77 -0
- data/spec/api/policies_api_spec.rb +105 -0
- data/spec/api/portal_api_spec.rb +87 -0
- data/spec/api/products_api_spec.rb +148 -0
- data/spec/api/releases_api_spec.rb +105 -0
- data/spec/api/tokens_api_spec.rb +74 -0
- data/spec/models/connect_stripe_spec.rb +36 -0
- data/spec/models/create_customer_spec.rb +42 -0
- data/spec/models/create_integration_mapping_spec.rb +42 -0
- data/spec/models/create_license_spec.rb +90 -0
- data/spec/models/create_policy_spec.rb +72 -0
- data/spec/models/create_portal_link_spec.rb +36 -0
- data/spec/models/create_product_spec.rb +42 -0
- data/spec/models/create_product_with_policy_spec.rb +54 -0
- data/spec/models/create_release_spec.rb +42 -0
- data/spec/models/create_token_spec.rb +46 -0
- data/spec/models/customer_list_spec.rb +42 -0
- data/spec/models/customer_spec.rb +72 -0
- data/spec/models/error_error_issues_inner_path_inner_spec.rb +21 -0
- data/spec/models/error_error_issues_inner_spec.rb +42 -0
- data/spec/models/error_error_spec.rb +48 -0
- data/spec/models/error_spec.rb +36 -0
- data/spec/models/event_actor_one_of1_spec.rb +58 -0
- data/spec/models/event_actor_one_of2_spec.rb +56 -0
- data/spec/models/event_actor_one_of3_spec.rb +40 -0
- data/spec/models/event_actor_one_of4_spec.rb +56 -0
- data/spec/models/event_actor_one_of_spec.rb +64 -0
- data/spec/models/event_actor_spec.rb +32 -0
- data/spec/models/event_list_spec.rb +42 -0
- data/spec/models/event_machine_spec.rb +48 -0
- data/spec/models/event_spec.rb +84 -0
- data/spec/models/event_type_spec.rb +30 -0
- data/spec/models/fixed_max_version_spec.rb +46 -0
- data/spec/models/integration_mapping_spec.rb +100 -0
- data/spec/models/integration_spec.rb +100 -0
- data/spec/models/integration_status_spec.rb +30 -0
- data/spec/models/license_list_spec.rb +42 -0
- data/spec/models/license_max_version_input_spec.rb +48 -0
- data/spec/models/license_max_version_spec.rb +48 -0
- data/spec/models/license_spec.rb +132 -0
- data/spec/models/license_stats_activations_by_machine_inner_spec.rb +54 -0
- data/spec/models/license_stats_activations_by_version_inner_spec.rb +42 -0
- data/spec/models/license_stats_spec.rb +60 -0
- data/spec/models/license_status_spec.rb +30 -0
- data/spec/models/license_token_spec.rb +36 -0
- data/spec/models/list_policy_events_type_parameter_spec.rb +21 -0
- data/spec/models/list_stripe_prices200_response_spec.rb +36 -0
- data/spec/models/lock_max_version_major_after_one_of1_spec.rb +46 -0
- data/spec/models/lock_max_version_major_after_one_of_spec.rb +46 -0
- data/spec/models/lock_max_version_major_after_spec.rb +32 -0
- data/spec/models/lock_max_version_minor_after_spec.rb +21 -0
- data/spec/models/lock_max_version_spec.rb +52 -0
- data/spec/models/machine_list_spec.rb +42 -0
- data/spec/models/machine_spec.rb +94 -0
- data/spec/models/pagination_spec.rb +54 -0
- data/spec/models/policy_duration_spec.rb +21 -0
- data/spec/models/policy_list_spec.rb +42 -0
- data/spec/models/policy_max_version_spec.rb +21 -0
- data/spec/models/policy_settings_duration_any_of1_spec.rb +46 -0
- data/spec/models/policy_settings_duration_any_of_spec.rb +46 -0
- data/spec/models/policy_settings_duration_spec.rb +21 -0
- data/spec/models/policy_settings_max_version_spec.rb +21 -0
- data/spec/models/policy_settings_spec.rb +54 -0
- data/spec/models/policy_spec.rb +102 -0
- data/spec/models/portal_link_spec.rb +48 -0
- data/spec/models/portal_not_found_spec.rb +48 -0
- data/spec/models/portal_settings_spec.rb +60 -0
- data/spec/models/portal_spec.rb +72 -0
- data/spec/models/price_input_spec.rb +42 -0
- data/spec/models/price_spec.rb +42 -0
- data/spec/models/product_list_spec.rb +42 -0
- data/spec/models/product_spec.rb +78 -0
- data/spec/models/product_stats_activations_by_version_inner_spec.rb +42 -0
- data/spec/models/product_stats_active_machines_by_platform_inner_spec.rb +42 -0
- data/spec/models/product_stats_active_machines_by_version_inner_spec.rb +42 -0
- data/spec/models/product_stats_new_licenses_by_policy_inner_spec.rb +48 -0
- data/spec/models/product_stats_spec.rb +144 -0
- data/spec/models/release_list_spec.rb +42 -0
- data/spec/models/release_spec.rb +66 -0
- data/spec/models/request_portal_link_spec.rb +42 -0
- data/spec/models/revenue_spec.rb +84 -0
- data/spec/models/send_license_keys_spec.rb +36 -0
- data/spec/models/send_portal_link_spec.rb +36 -0
- data/spec/models/signing_key_spec.rb +58 -0
- data/spec/models/stripe_integration_spec.rb +60 -0
- data/spec/models/stripe_permission_spec.rb +52 -0
- data/spec/models/stripe_price_spec.rb +66 -0
- data/spec/models/token_spec.rb +62 -0
- data/spec/models/update_customer_spec.rb +42 -0
- data/spec/models/update_integration_mapping_spec.rb +36 -0
- data/spec/models/update_license_spec.rb +66 -0
- data/spec/models/update_policy_spec.rb +72 -0
- data/spec/models/update_product_portal_spec.rb +60 -0
- data/spec/models/update_product_spec.rb +48 -0
- data/spec/models/update_release_spec.rb +42 -0
- data/spec/models/validate_key_error_error_spec.rb +54 -0
- data/spec/models/validate_key_error_spec.rb +36 -0
- data/spec/models/validate_key_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +532 -0
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module LicenseManager
|
|
17
|
+
class ProductStats < ApiModelBase
|
|
18
|
+
# Number of licenses of the product.
|
|
19
|
+
attr_accessor :license_count
|
|
20
|
+
|
|
21
|
+
# Number of licenses that haven't expired, and that a machine validated in the last 90 days.
|
|
22
|
+
attr_accessor :active_license_count
|
|
23
|
+
|
|
24
|
+
# Number of licenses created in the last 30 days, today included, in UTC.
|
|
25
|
+
attr_accessor :new_license_count
|
|
26
|
+
|
|
27
|
+
# Number of licenses expiring in the next 30 days.
|
|
28
|
+
attr_accessor :expiring_license_count
|
|
29
|
+
|
|
30
|
+
# Number of licenses that expired in the last 30 days.
|
|
31
|
+
attr_accessor :expired_license_count
|
|
32
|
+
|
|
33
|
+
# Number of active machines of the licenses of the product.
|
|
34
|
+
attr_accessor :active_machine_count
|
|
35
|
+
|
|
36
|
+
# Number of licenses with at least one active machine.
|
|
37
|
+
attr_accessor :in_use_license_count
|
|
38
|
+
|
|
39
|
+
# Sum of the maximum numbers of machines of the licenses that haven't expired. Licenses without a maximum are left out.
|
|
40
|
+
attr_accessor :seat_count
|
|
41
|
+
|
|
42
|
+
# Number of active machines of the licenses counted in `seatCount`, at most their maximum number of machines each.
|
|
43
|
+
attr_accessor :used_seat_count
|
|
44
|
+
|
|
45
|
+
# Number of licenses counted in `seatCount` active on their maximum number of machines.
|
|
46
|
+
attr_accessor :full_license_count
|
|
47
|
+
|
|
48
|
+
# The 30 days covered by the daily stats, from the oldest one, in UTC.
|
|
49
|
+
attr_accessor :days
|
|
50
|
+
|
|
51
|
+
# The 12 months covered by the monthly stats, from the oldest one, in UTC.
|
|
52
|
+
attr_accessor :months
|
|
53
|
+
|
|
54
|
+
# Number of licenses created each day, aligned on `days`.
|
|
55
|
+
attr_accessor :new_licenses_by_day
|
|
56
|
+
|
|
57
|
+
# Number of licenses created each month, aligned on `months`.
|
|
58
|
+
attr_accessor :new_licenses_by_month
|
|
59
|
+
|
|
60
|
+
# Number of licenses of each policy created each day and each month, for the policies with licenses created over the covered months.
|
|
61
|
+
attr_accessor :new_licenses_by_policy
|
|
62
|
+
|
|
63
|
+
# Revenue in each currency licenses were sold in, from the one with the most licenses sold. Amounts aren't converted between currencies.
|
|
64
|
+
attr_accessor :revenue
|
|
65
|
+
|
|
66
|
+
# Successful activations of the licenses of the product each day, per version of the application, from the most recent one.
|
|
67
|
+
attr_accessor :activations_by_version
|
|
68
|
+
|
|
69
|
+
# Number of active machines running each version of the application, from the most recent one.
|
|
70
|
+
attr_accessor :active_machines_by_version
|
|
71
|
+
|
|
72
|
+
# Number of active machines on each platform, from the one with the most machines.
|
|
73
|
+
attr_accessor :active_machines_by_platform
|
|
74
|
+
|
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
76
|
+
def self.attribute_map
|
|
77
|
+
{
|
|
78
|
+
:'license_count' => :'licenseCount',
|
|
79
|
+
:'active_license_count' => :'activeLicenseCount',
|
|
80
|
+
:'new_license_count' => :'newLicenseCount',
|
|
81
|
+
:'expiring_license_count' => :'expiringLicenseCount',
|
|
82
|
+
:'expired_license_count' => :'expiredLicenseCount',
|
|
83
|
+
:'active_machine_count' => :'activeMachineCount',
|
|
84
|
+
:'in_use_license_count' => :'inUseLicenseCount',
|
|
85
|
+
:'seat_count' => :'seatCount',
|
|
86
|
+
:'used_seat_count' => :'usedSeatCount',
|
|
87
|
+
:'full_license_count' => :'fullLicenseCount',
|
|
88
|
+
:'days' => :'days',
|
|
89
|
+
:'months' => :'months',
|
|
90
|
+
:'new_licenses_by_day' => :'newLicensesByDay',
|
|
91
|
+
:'new_licenses_by_month' => :'newLicensesByMonth',
|
|
92
|
+
:'new_licenses_by_policy' => :'newLicensesByPolicy',
|
|
93
|
+
:'revenue' => :'revenue',
|
|
94
|
+
:'activations_by_version' => :'activationsByVersion',
|
|
95
|
+
:'active_machines_by_version' => :'activeMachinesByVersion',
|
|
96
|
+
:'active_machines_by_platform' => :'activeMachinesByPlatform'
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Returns attribute mapping this model knows about
|
|
101
|
+
def self.acceptable_attribute_map
|
|
102
|
+
attribute_map
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns all the JSON keys this model knows about
|
|
106
|
+
def self.acceptable_attributes
|
|
107
|
+
acceptable_attribute_map.values
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Attribute type mapping.
|
|
111
|
+
def self.openapi_types
|
|
112
|
+
{
|
|
113
|
+
:'license_count' => :'Integer',
|
|
114
|
+
:'active_license_count' => :'Integer',
|
|
115
|
+
:'new_license_count' => :'Integer',
|
|
116
|
+
:'expiring_license_count' => :'Integer',
|
|
117
|
+
:'expired_license_count' => :'Integer',
|
|
118
|
+
:'active_machine_count' => :'Integer',
|
|
119
|
+
:'in_use_license_count' => :'Integer',
|
|
120
|
+
:'seat_count' => :'Integer',
|
|
121
|
+
:'used_seat_count' => :'Integer',
|
|
122
|
+
:'full_license_count' => :'Integer',
|
|
123
|
+
:'days' => :'Array<Date>',
|
|
124
|
+
:'months' => :'Array<String>',
|
|
125
|
+
:'new_licenses_by_day' => :'Array<Integer>',
|
|
126
|
+
:'new_licenses_by_month' => :'Array<Integer>',
|
|
127
|
+
:'new_licenses_by_policy' => :'Array<ProductStatsNewLicensesByPolicyInner>',
|
|
128
|
+
:'revenue' => :'Array<Revenue>',
|
|
129
|
+
:'activations_by_version' => :'Array<ProductStatsActivationsByVersionInner>',
|
|
130
|
+
:'active_machines_by_version' => :'Array<ProductStatsActiveMachinesByVersionInner>',
|
|
131
|
+
:'active_machines_by_platform' => :'Array<ProductStatsActiveMachinesByPlatformInner>'
|
|
132
|
+
}
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# List of attributes with nullable: true
|
|
136
|
+
def self.openapi_nullable
|
|
137
|
+
Set.new([
|
|
138
|
+
])
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns attribute type mapping
|
|
142
|
+
def self.acceptable_openapi_types
|
|
143
|
+
openapi_types
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the nullable attributes
|
|
147
|
+
def self.acceptable_openapi_nullable
|
|
148
|
+
openapi_nullable
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Initializes the object
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
def initialize(attributes = {})
|
|
154
|
+
if (!attributes.is_a?(Hash))
|
|
155
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::ProductStats` initialize method"
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
159
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
160
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
161
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
162
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::ProductStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
163
|
+
end
|
|
164
|
+
h[k.to_sym] = v
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'license_count')
|
|
168
|
+
self.license_count = attributes[:'license_count']
|
|
169
|
+
else
|
|
170
|
+
self.license_count = nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'active_license_count')
|
|
174
|
+
self.active_license_count = attributes[:'active_license_count']
|
|
175
|
+
else
|
|
176
|
+
self.active_license_count = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'new_license_count')
|
|
180
|
+
self.new_license_count = attributes[:'new_license_count']
|
|
181
|
+
else
|
|
182
|
+
self.new_license_count = nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'expiring_license_count')
|
|
186
|
+
self.expiring_license_count = attributes[:'expiring_license_count']
|
|
187
|
+
else
|
|
188
|
+
self.expiring_license_count = nil
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'expired_license_count')
|
|
192
|
+
self.expired_license_count = attributes[:'expired_license_count']
|
|
193
|
+
else
|
|
194
|
+
self.expired_license_count = nil
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'active_machine_count')
|
|
198
|
+
self.active_machine_count = attributes[:'active_machine_count']
|
|
199
|
+
else
|
|
200
|
+
self.active_machine_count = nil
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'in_use_license_count')
|
|
204
|
+
self.in_use_license_count = attributes[:'in_use_license_count']
|
|
205
|
+
else
|
|
206
|
+
self.in_use_license_count = nil
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'seat_count')
|
|
210
|
+
self.seat_count = attributes[:'seat_count']
|
|
211
|
+
else
|
|
212
|
+
self.seat_count = nil
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'used_seat_count')
|
|
216
|
+
self.used_seat_count = attributes[:'used_seat_count']
|
|
217
|
+
else
|
|
218
|
+
self.used_seat_count = nil
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if attributes.key?(:'full_license_count')
|
|
222
|
+
self.full_license_count = attributes[:'full_license_count']
|
|
223
|
+
else
|
|
224
|
+
self.full_license_count = nil
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'days')
|
|
228
|
+
if (value = attributes[:'days']).is_a?(Array)
|
|
229
|
+
self.days = value
|
|
230
|
+
end
|
|
231
|
+
else
|
|
232
|
+
self.days = nil
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'months')
|
|
236
|
+
if (value = attributes[:'months']).is_a?(Array)
|
|
237
|
+
self.months = value
|
|
238
|
+
end
|
|
239
|
+
else
|
|
240
|
+
self.months = nil
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'new_licenses_by_day')
|
|
244
|
+
if (value = attributes[:'new_licenses_by_day']).is_a?(Array)
|
|
245
|
+
self.new_licenses_by_day = value
|
|
246
|
+
end
|
|
247
|
+
else
|
|
248
|
+
self.new_licenses_by_day = nil
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'new_licenses_by_month')
|
|
252
|
+
if (value = attributes[:'new_licenses_by_month']).is_a?(Array)
|
|
253
|
+
self.new_licenses_by_month = value
|
|
254
|
+
end
|
|
255
|
+
else
|
|
256
|
+
self.new_licenses_by_month = nil
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'new_licenses_by_policy')
|
|
260
|
+
if (value = attributes[:'new_licenses_by_policy']).is_a?(Array)
|
|
261
|
+
self.new_licenses_by_policy = value
|
|
262
|
+
end
|
|
263
|
+
else
|
|
264
|
+
self.new_licenses_by_policy = nil
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'revenue')
|
|
268
|
+
if (value = attributes[:'revenue']).is_a?(Array)
|
|
269
|
+
self.revenue = value
|
|
270
|
+
end
|
|
271
|
+
else
|
|
272
|
+
self.revenue = nil
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'activations_by_version')
|
|
276
|
+
if (value = attributes[:'activations_by_version']).is_a?(Array)
|
|
277
|
+
self.activations_by_version = value
|
|
278
|
+
end
|
|
279
|
+
else
|
|
280
|
+
self.activations_by_version = nil
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if attributes.key?(:'active_machines_by_version')
|
|
284
|
+
if (value = attributes[:'active_machines_by_version']).is_a?(Array)
|
|
285
|
+
self.active_machines_by_version = value
|
|
286
|
+
end
|
|
287
|
+
else
|
|
288
|
+
self.active_machines_by_version = nil
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'active_machines_by_platform')
|
|
292
|
+
if (value = attributes[:'active_machines_by_platform']).is_a?(Array)
|
|
293
|
+
self.active_machines_by_platform = value
|
|
294
|
+
end
|
|
295
|
+
else
|
|
296
|
+
self.active_machines_by_platform = nil
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
301
|
+
# @return Array for valid properties with the reasons
|
|
302
|
+
def list_invalid_properties
|
|
303
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
304
|
+
invalid_properties = Array.new
|
|
305
|
+
if @license_count.nil?
|
|
306
|
+
invalid_properties.push('invalid value for "license_count", license_count cannot be nil.')
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if @active_license_count.nil?
|
|
310
|
+
invalid_properties.push('invalid value for "active_license_count", active_license_count cannot be nil.')
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if @new_license_count.nil?
|
|
314
|
+
invalid_properties.push('invalid value for "new_license_count", new_license_count cannot be nil.')
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if @expiring_license_count.nil?
|
|
318
|
+
invalid_properties.push('invalid value for "expiring_license_count", expiring_license_count cannot be nil.')
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
if @expired_license_count.nil?
|
|
322
|
+
invalid_properties.push('invalid value for "expired_license_count", expired_license_count cannot be nil.')
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
if @active_machine_count.nil?
|
|
326
|
+
invalid_properties.push('invalid value for "active_machine_count", active_machine_count cannot be nil.')
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if @in_use_license_count.nil?
|
|
330
|
+
invalid_properties.push('invalid value for "in_use_license_count", in_use_license_count cannot be nil.')
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
if @seat_count.nil?
|
|
334
|
+
invalid_properties.push('invalid value for "seat_count", seat_count cannot be nil.')
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if @used_seat_count.nil?
|
|
338
|
+
invalid_properties.push('invalid value for "used_seat_count", used_seat_count cannot be nil.')
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
if @full_license_count.nil?
|
|
342
|
+
invalid_properties.push('invalid value for "full_license_count", full_license_count cannot be nil.')
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if @days.nil?
|
|
346
|
+
invalid_properties.push('invalid value for "days", days cannot be nil.')
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if @months.nil?
|
|
350
|
+
invalid_properties.push('invalid value for "months", months cannot be nil.')
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
if @new_licenses_by_day.nil?
|
|
354
|
+
invalid_properties.push('invalid value for "new_licenses_by_day", new_licenses_by_day cannot be nil.')
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if @new_licenses_by_month.nil?
|
|
358
|
+
invalid_properties.push('invalid value for "new_licenses_by_month", new_licenses_by_month cannot be nil.')
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
if @new_licenses_by_policy.nil?
|
|
362
|
+
invalid_properties.push('invalid value for "new_licenses_by_policy", new_licenses_by_policy cannot be nil.')
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if @revenue.nil?
|
|
366
|
+
invalid_properties.push('invalid value for "revenue", revenue cannot be nil.')
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if @activations_by_version.nil?
|
|
370
|
+
invalid_properties.push('invalid value for "activations_by_version", activations_by_version cannot be nil.')
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
if @active_machines_by_version.nil?
|
|
374
|
+
invalid_properties.push('invalid value for "active_machines_by_version", active_machines_by_version cannot be nil.')
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if @active_machines_by_platform.nil?
|
|
378
|
+
invalid_properties.push('invalid value for "active_machines_by_platform", active_machines_by_platform cannot be nil.')
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
invalid_properties
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Check to see if the all the properties in the model are valid
|
|
385
|
+
# @return true if the model is valid
|
|
386
|
+
def valid?
|
|
387
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
388
|
+
return false if @license_count.nil?
|
|
389
|
+
return false if @active_license_count.nil?
|
|
390
|
+
return false if @new_license_count.nil?
|
|
391
|
+
return false if @expiring_license_count.nil?
|
|
392
|
+
return false if @expired_license_count.nil?
|
|
393
|
+
return false if @active_machine_count.nil?
|
|
394
|
+
return false if @in_use_license_count.nil?
|
|
395
|
+
return false if @seat_count.nil?
|
|
396
|
+
return false if @used_seat_count.nil?
|
|
397
|
+
return false if @full_license_count.nil?
|
|
398
|
+
return false if @days.nil?
|
|
399
|
+
return false if @months.nil?
|
|
400
|
+
return false if @new_licenses_by_day.nil?
|
|
401
|
+
return false if @new_licenses_by_month.nil?
|
|
402
|
+
return false if @new_licenses_by_policy.nil?
|
|
403
|
+
return false if @revenue.nil?
|
|
404
|
+
return false if @activations_by_version.nil?
|
|
405
|
+
return false if @active_machines_by_version.nil?
|
|
406
|
+
return false if @active_machines_by_platform.nil?
|
|
407
|
+
true
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# Custom attribute writer method with validation
|
|
411
|
+
# @param [Object] license_count Value to be assigned
|
|
412
|
+
def license_count=(license_count)
|
|
413
|
+
if license_count.nil?
|
|
414
|
+
fail ArgumentError, 'license_count cannot be nil'
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
@license_count = license_count
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# Custom attribute writer method with validation
|
|
421
|
+
# @param [Object] active_license_count Value to be assigned
|
|
422
|
+
def active_license_count=(active_license_count)
|
|
423
|
+
if active_license_count.nil?
|
|
424
|
+
fail ArgumentError, 'active_license_count cannot be nil'
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
@active_license_count = active_license_count
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Custom attribute writer method with validation
|
|
431
|
+
# @param [Object] new_license_count Value to be assigned
|
|
432
|
+
def new_license_count=(new_license_count)
|
|
433
|
+
if new_license_count.nil?
|
|
434
|
+
fail ArgumentError, 'new_license_count cannot be nil'
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
@new_license_count = new_license_count
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Custom attribute writer method with validation
|
|
441
|
+
# @param [Object] expiring_license_count Value to be assigned
|
|
442
|
+
def expiring_license_count=(expiring_license_count)
|
|
443
|
+
if expiring_license_count.nil?
|
|
444
|
+
fail ArgumentError, 'expiring_license_count cannot be nil'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
@expiring_license_count = expiring_license_count
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Custom attribute writer method with validation
|
|
451
|
+
# @param [Object] expired_license_count Value to be assigned
|
|
452
|
+
def expired_license_count=(expired_license_count)
|
|
453
|
+
if expired_license_count.nil?
|
|
454
|
+
fail ArgumentError, 'expired_license_count cannot be nil'
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
@expired_license_count = expired_license_count
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Custom attribute writer method with validation
|
|
461
|
+
# @param [Object] active_machine_count Value to be assigned
|
|
462
|
+
def active_machine_count=(active_machine_count)
|
|
463
|
+
if active_machine_count.nil?
|
|
464
|
+
fail ArgumentError, 'active_machine_count cannot be nil'
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
@active_machine_count = active_machine_count
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Custom attribute writer method with validation
|
|
471
|
+
# @param [Object] in_use_license_count Value to be assigned
|
|
472
|
+
def in_use_license_count=(in_use_license_count)
|
|
473
|
+
if in_use_license_count.nil?
|
|
474
|
+
fail ArgumentError, 'in_use_license_count cannot be nil'
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
@in_use_license_count = in_use_license_count
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Custom attribute writer method with validation
|
|
481
|
+
# @param [Object] seat_count Value to be assigned
|
|
482
|
+
def seat_count=(seat_count)
|
|
483
|
+
if seat_count.nil?
|
|
484
|
+
fail ArgumentError, 'seat_count cannot be nil'
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
@seat_count = seat_count
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# Custom attribute writer method with validation
|
|
491
|
+
# @param [Object] used_seat_count Value to be assigned
|
|
492
|
+
def used_seat_count=(used_seat_count)
|
|
493
|
+
if used_seat_count.nil?
|
|
494
|
+
fail ArgumentError, 'used_seat_count cannot be nil'
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
@used_seat_count = used_seat_count
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# Custom attribute writer method with validation
|
|
501
|
+
# @param [Object] full_license_count Value to be assigned
|
|
502
|
+
def full_license_count=(full_license_count)
|
|
503
|
+
if full_license_count.nil?
|
|
504
|
+
fail ArgumentError, 'full_license_count cannot be nil'
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
@full_license_count = full_license_count
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# Custom attribute writer method with validation
|
|
511
|
+
# @param [Object] days Value to be assigned
|
|
512
|
+
def days=(days)
|
|
513
|
+
if days.nil?
|
|
514
|
+
fail ArgumentError, 'days cannot be nil'
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
@days = days
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Custom attribute writer method with validation
|
|
521
|
+
# @param [Object] months Value to be assigned
|
|
522
|
+
def months=(months)
|
|
523
|
+
if months.nil?
|
|
524
|
+
fail ArgumentError, 'months cannot be nil'
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
@months = months
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
# Custom attribute writer method with validation
|
|
531
|
+
# @param [Object] new_licenses_by_day Value to be assigned
|
|
532
|
+
def new_licenses_by_day=(new_licenses_by_day)
|
|
533
|
+
if new_licenses_by_day.nil?
|
|
534
|
+
fail ArgumentError, 'new_licenses_by_day cannot be nil'
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
@new_licenses_by_day = new_licenses_by_day
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Custom attribute writer method with validation
|
|
541
|
+
# @param [Object] new_licenses_by_month Value to be assigned
|
|
542
|
+
def new_licenses_by_month=(new_licenses_by_month)
|
|
543
|
+
if new_licenses_by_month.nil?
|
|
544
|
+
fail ArgumentError, 'new_licenses_by_month cannot be nil'
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
@new_licenses_by_month = new_licenses_by_month
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
# Custom attribute writer method with validation
|
|
551
|
+
# @param [Object] new_licenses_by_policy Value to be assigned
|
|
552
|
+
def new_licenses_by_policy=(new_licenses_by_policy)
|
|
553
|
+
if new_licenses_by_policy.nil?
|
|
554
|
+
fail ArgumentError, 'new_licenses_by_policy cannot be nil'
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
@new_licenses_by_policy = new_licenses_by_policy
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Custom attribute writer method with validation
|
|
561
|
+
# @param [Object] revenue Value to be assigned
|
|
562
|
+
def revenue=(revenue)
|
|
563
|
+
if revenue.nil?
|
|
564
|
+
fail ArgumentError, 'revenue cannot be nil'
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
@revenue = revenue
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# Custom attribute writer method with validation
|
|
571
|
+
# @param [Object] activations_by_version Value to be assigned
|
|
572
|
+
def activations_by_version=(activations_by_version)
|
|
573
|
+
if activations_by_version.nil?
|
|
574
|
+
fail ArgumentError, 'activations_by_version cannot be nil'
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
@activations_by_version = activations_by_version
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
# Custom attribute writer method with validation
|
|
581
|
+
# @param [Object] active_machines_by_version Value to be assigned
|
|
582
|
+
def active_machines_by_version=(active_machines_by_version)
|
|
583
|
+
if active_machines_by_version.nil?
|
|
584
|
+
fail ArgumentError, 'active_machines_by_version cannot be nil'
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
@active_machines_by_version = active_machines_by_version
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
# Custom attribute writer method with validation
|
|
591
|
+
# @param [Object] active_machines_by_platform Value to be assigned
|
|
592
|
+
def active_machines_by_platform=(active_machines_by_platform)
|
|
593
|
+
if active_machines_by_platform.nil?
|
|
594
|
+
fail ArgumentError, 'active_machines_by_platform cannot be nil'
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
@active_machines_by_platform = active_machines_by_platform
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
# Checks equality by comparing each attribute.
|
|
601
|
+
# @param [Object] Object to be compared
|
|
602
|
+
def ==(o)
|
|
603
|
+
return true if self.equal?(o)
|
|
604
|
+
self.class == o.class &&
|
|
605
|
+
license_count == o.license_count &&
|
|
606
|
+
active_license_count == o.active_license_count &&
|
|
607
|
+
new_license_count == o.new_license_count &&
|
|
608
|
+
expiring_license_count == o.expiring_license_count &&
|
|
609
|
+
expired_license_count == o.expired_license_count &&
|
|
610
|
+
active_machine_count == o.active_machine_count &&
|
|
611
|
+
in_use_license_count == o.in_use_license_count &&
|
|
612
|
+
seat_count == o.seat_count &&
|
|
613
|
+
used_seat_count == o.used_seat_count &&
|
|
614
|
+
full_license_count == o.full_license_count &&
|
|
615
|
+
days == o.days &&
|
|
616
|
+
months == o.months &&
|
|
617
|
+
new_licenses_by_day == o.new_licenses_by_day &&
|
|
618
|
+
new_licenses_by_month == o.new_licenses_by_month &&
|
|
619
|
+
new_licenses_by_policy == o.new_licenses_by_policy &&
|
|
620
|
+
revenue == o.revenue &&
|
|
621
|
+
activations_by_version == o.activations_by_version &&
|
|
622
|
+
active_machines_by_version == o.active_machines_by_version &&
|
|
623
|
+
active_machines_by_platform == o.active_machines_by_platform
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
# @see the `==` method
|
|
627
|
+
# @param [Object] Object to be compared
|
|
628
|
+
def eql?(o)
|
|
629
|
+
self == o
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# Calculates hash code according to all attributes.
|
|
633
|
+
# @return [Integer] Hash code
|
|
634
|
+
def hash
|
|
635
|
+
[license_count, active_license_count, new_license_count, expiring_license_count, expired_license_count, active_machine_count, in_use_license_count, seat_count, used_seat_count, full_license_count, days, months, new_licenses_by_day, new_licenses_by_month, new_licenses_by_policy, revenue, activations_by_version, active_machines_by_version, active_machines_by_platform].hash
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Builds the object from hash
|
|
639
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
640
|
+
# @return [Object] Returns the model itself
|
|
641
|
+
def self.build_from_hash(attributes)
|
|
642
|
+
return nil unless attributes.is_a?(Hash)
|
|
643
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
644
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
645
|
+
map = acceptable_attribute_map
|
|
646
|
+
transformed_hash = {}
|
|
647
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
648
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
649
|
+
transformed_hash["#{key}"] = nil
|
|
650
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
651
|
+
# check to ensure the input is an array given that the attribute
|
|
652
|
+
# is documented as an array but the input is not
|
|
653
|
+
if attributes[map[key]].is_a?(Array)
|
|
654
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
655
|
+
end
|
|
656
|
+
elsif !attributes[map[key]].nil?
|
|
657
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
658
|
+
end
|
|
659
|
+
end
|
|
660
|
+
new(transformed_hash)
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# Returns the object in the form of hash
|
|
664
|
+
# @return [Hash] Returns the object in the form of hash
|
|
665
|
+
def to_hash
|
|
666
|
+
hash = {}
|
|
667
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
668
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
669
|
+
value = self.send(attr)
|
|
670
|
+
if value.nil?
|
|
671
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
672
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
hash[param] = _to_hash(value)
|
|
676
|
+
end
|
|
677
|
+
hash
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
end
|
|
681
|
+
|
|
682
|
+
end
|