<commit_before>#
# Author:: <NAME> <<EMAIL>>

# Cookbook Name:: f5-bigip
# Resource:: ltm_sslcert
#
# Copyright:: 2015, Sky Betting and Gaming
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

class Chef
  class Resource
    #
    # Chef Resource for F5 LTM iRule
    #
    class  F5LtmSslcert < Chef::Resource
      def initialize(name, run_context = nil)
        super
        @resource_name = :f5_ltm_sslcert
        @provider = Chef::Provider::F5LtmSslcert
        @action = :create
        @allowed_actions = [:create, :delete, :update]

        # This is equivalent to setting :name_attribute => true
        @sslcert_name = name
        @variables = []

        set_defaults
      end

      def sslcert_name(arg = nil)
        set_or_return(:sslcert_name, arg, :kind_of => String, :required => true)
      end

      def key(arg = nil)
        set_or_return(:key, arg, :kind_of => String, :required => true)
      end

      def crt(arg = nil)
        set_or_return(:crt, arg, :kind_of => String, :required => true)
      end

      def mode(arg = nil)
        set_or_return(:mode, arg, :kind_of => String, :required => false)
      end

      def override(arg = nil)
        set_or_return(:variables, arg, :kind_of => [TrueClass, FalseClass], :required => false)
      end

      def f5(arg = nil)
        set_or_return(:f5, arg, :kind_of => String, :required => true)
      end

      private
      def set_defaults
        @mode = 'MANAGEMENT_MODE_DEFAULT'
        @key = ''
        @crt = ''
        @override = false
      end

      attr_accessor :exists, :update, :sslcert
    end
  end
end<commit_msg>trying to correct attrs<commit_after>#
# Author:: <NAME> <<EMAIL>>

# Cookbook Name:: f5-bigip
# Resource:: ltm_sslcert
#
# Copyright:: 2015, Sky Betting and Gaming
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

class Chef
  class Resource
    #
    # Chef Resource for F5 LTM iRule
    #
    class  F5LtmSslcert < Chef::Resource
      def initialize(name, run_context = nil)
        super
        @resource_name = :f5_ltm_sslcert
        @provider = Chef::Provider::F5LtmSslcert
        @action = :create
        @allowed_actions = [:create, :delete, :update]

        # This is equivalent to setting :name_attribute => true
        @sslcert_name = name
        @variables = []

        set_defaults
      end

      def sslcert_name(arg = nil)
        set_or_return(:sslcert_name, arg, :kind_of => String, :required => true)
      end

      def key(arg = nil)
        set_or_return(:key, arg, :kind_of => String, :required => true)
      end

      def crt(arg = nil)
        set_or_return(:crt, arg, :kind_of => String, :required => true)
      end

      def mode(arg = nil)
        set_or_return(:mode, arg, :kind_of => String, :required => false)
      end

      def override(arg = nil)
        set_or_return(:variables, arg, :kind_of => [TrueClass, FalseClass], :required => false)
      end

      def f5(arg = nil)
        set_or_return(:f5, arg, :kind_of => String, :required => true)
      end

      attr_accessor :exists, :update

      private
      def set_defaults
        @mode = 'MANAGEMENT_MODE_DEFAULT'
        @key = ''
        @crt = ''
        @override = false
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.10111032364753131, 'fraction_numerical': 0.007087172218284904, 'mean_word_length': 2.6374570446735395, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1344303', 'n_tokens_mistral': 1316, 'n_tokens_neox': 1277, 'n_words': 423}