# encoding: utf-8
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

require 'azure_mgmt_redis'

module Azure::Redis::Profiles::Latest
  module Mgmt
    Operations = Azure::Redis::Mgmt::V2018_03_01::Operations
    Redis = Azure::Redis::Mgmt::V2018_03_01::Redis
    FirewallRules = Azure::Redis::Mgmt::V2018_03_01::FirewallRules
    PatchSchedules = Azure::Redis::Mgmt::V2018_03_01::PatchSchedules
    LinkedServer = Azure::Redis::Mgmt::V2018_03_01::LinkedServer

    module Models
      RedisRebootParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisRebootParameters
      Sku = Azure::Redis::Mgmt::V2018_03_01::Models::Sku
      ExportRDBParameters = Azure::Redis::Mgmt::V2018_03_01::Models::ExportRDBParameters
      RedisListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisListResult
      RedisAccessKeys = Azure::Redis::Mgmt::V2018_03_01::Models::RedisAccessKeys
      RedisRegenerateKeyParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisRegenerateKeyParameters
      Resource = Azure::Redis::Mgmt::V2018_03_01::Models::Resource
      NotificationListResponse = Azure::Redis::Mgmt::V2018_03_01::Models::NotificationListResponse
      OperationListResult = Azure::Redis::Mgmt::V2018_03_01::Models::OperationListResult
      RedisUpdateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisUpdateParameters
      ImportRDBParameters = Azure::Redis::Mgmt::V2018_03_01::Models::ImportRDBParameters
      RedisFirewallRuleCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleCreateParameters
      ScheduleEntry = Azure::Redis::Mgmt::V2018_03_01::Models::ScheduleEntry
      CheckNameAvailabilityParameters = Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters
      Operation = Azure::Redis::Mgmt::V2018_03_01::Models::Operation
      RedisPatchScheduleListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchScheduleListResult
      UpgradeNotification = Azure::Redis::Mgmt::V2018_03_01::Models::UpgradeNotification
      RedisForceRebootResponse = Azure::Redis::Mgmt::V2018_03_01::Models::RedisForceRebootResponse
      RedisLinkedServer = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServer
      OperationDisplay = Azure::Redis::Mgmt::V2018_03_01::Models::OperationDisplay
      RedisFirewallRuleListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleListResult
      RedisLinkedServerWithPropertiesList = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithPropertiesList
      RedisCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisCreateParameters
      RedisLinkedServerCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerCreateParameters
      ProxyResource = Azure::Redis::Mgmt::V2018_03_01::Models::ProxyResource
      TrackedResource = Azure::Redis::Mgmt::V2018_03_01::Models::TrackedResource
      RedisFirewallRule = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRule
      RedisResource = Azure::Redis::Mgmt::V2018_03_01::Models::RedisResource
      RedisPatchSchedule = Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchSchedule
      RedisLinkedServerWithProperties = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithProperties
      SkuName = Azure::Redis::Mgmt::V2018_03_01::Models::SkuName
      SkuFamily = Azure::Redis::Mgmt::V2018_03_01::Models::SkuFamily
      TlsVersion = Azure::Redis::Mgmt::V2018_03_01::Models::TlsVersion
      ProvisioningState = Azure::Redis::Mgmt::V2018_03_01::Models::ProvisioningState
      RedisKeyType = Azure::Redis::Mgmt::V2018_03_01::Models::RedisKeyType
      RebootType = Azure::Redis::Mgmt::V2018_03_01::Models::RebootType
      DayOfWeek = Azure::Redis::Mgmt::V2018_03_01::Models::DayOfWeek
      ReplicationRole = Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole
    end

    #
    # RedisManagementClass
    #
    class RedisManagementClass
      attr_reader :operations, :redis, :firewall_rules, :patch_schedules, :linked_server, :configurable, :base_url, :options, :model_classes

      def initialize(options = {})
        if options.is_a?(Hash) && options.length == 0
          @options = setup_default_options
        else
          @options = options
        end

        reset!(options)

        @configurable = self
        @base_url = options[:base_url].nil? ? nil:options[:base_url]
        @options = options[:options].nil? ? nil:options[:options]

        @client_0 = Azure::Redis::Mgmt::V2018_03_01::RedisManagementClient.new(configurable.credentials, base_url, options)
        if(@client_0.respond_to?(:subscription_id))
          @client_0.subscription_id = configurable.subscription_id
        end
        add_telemetry(@client_0)
        @operations = @client_0.operations
        @redis = @client_0.redis
        @firewall_rules = @client_0.firewall_rules
        @patch_schedules = @client_0.patch_schedules
        @linked_server = @client_0.linked_server

        @model_classes = ModelClasses.new
      end

      def add_telemetry(client)
        profile_information = 'Profiles/Latest/Redis/Mgmt'
        client.add_user_agent_information(profile_information)
      end

      def method_missing(method, *args)
        if @client_0.respond_to?method
          @client_0.send(method, *args)
        else
          super
        end
      end

    end

    class ModelClasses
      def redis_reboot_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisRebootParameters
      end
      def sku
        Azure::Redis::Mgmt::V2018_03_01::Models::Sku
      end
      def export_rdbparameters
        Azure::Redis::Mgmt::V2018_03_01::Models::ExportRDBParameters
      end
      def redis_list_result
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisListResult
      end
      def redis_access_keys
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisAccessKeys
      end
      def redis_regenerate_key_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisRegenerateKeyParameters
      end
      def resource
        Azure::Redis::Mgmt::V2018_03_01::Models::Resource
      end
      def notification_list_response
        Azure::Redis::Mgmt::V2018_03_01::Models::NotificationListResponse
      end
      def operation_list_result
        Azure::Redis::Mgmt::V2018_03_01::Models::OperationListResult
      end
      def redis_update_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisUpdateParameters
      end
      def import_rdbparameters
        Azure::Redis::Mgmt::V2018_03_01::Models::ImportRDBParameters
      end
      def redis_firewall_rule_create_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleCreateParameters
      end
      def schedule_entry
        Azure::Redis::Mgmt::V2018_03_01::Models::ScheduleEntry
      end
      def check_name_availability_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters
      end
      def operation
        Azure::Redis::Mgmt::V2018_03_01::Models::Operation
      end
      def redis_patch_schedule_list_result
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchScheduleListResult
      end
      def upgrade_notification
        Azure::Redis::Mgmt::V2018_03_01::Models::UpgradeNotification
      end
      def redis_force_reboot_response
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisForceRebootResponse
      end
      def redis_linked_server
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServer
      end
      def operation_display
        Azure::Redis::Mgmt::V2018_03_01::Models::OperationDisplay
      end
      def redis_firewall_rule_list_result
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleListResult
      end
      def redis_linked_server_with_properties_list
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithPropertiesList
      end
      def redis_create_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisCreateParameters
      end
      def redis_linked_server_create_parameters
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerCreateParameters
      end
      def proxy_resource
        Azure::Redis::Mgmt::V2018_03_01::Models::ProxyResource
      end
      def tracked_resource
        Azure::Redis::Mgmt::V2018_03_01::Models::TrackedResource
      end
      def redis_firewall_rule
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRule
      end
      def redis_resource
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisResource
      end
      def redis_patch_schedule
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchSchedule
      end
      def redis_linked_server_with_properties
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithProperties
      end
      def sku_name
        Azure::Redis::Mgmt::V2018_03_01::Models::SkuName
      end
      def sku_family
        Azure::Redis::Mgmt::V2018_03_01::Models::SkuFamily
      end
      def tls_version
        Azure::Redis::Mgmt::V2018_03_01::Models::TlsVersion
      end
      def provisioning_state
        Azure::Redis::Mgmt::V2018_03_01::Models::ProvisioningState
      end
      def redis_key_type
        Azure::Redis::Mgmt::V2018_03_01::Models::RedisKeyType
      end
      def reboot_type
        Azure::Redis::Mgmt::V2018_03_01::Models::RebootType
      end
      def day_of_week
        Azure::Redis::Mgmt::V2018_03_01::Models::DayOfWeek
      end
      def replication_role
        Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole
      end
    end
  end
end
