Class: OCI::IdentityDomains::Models::AppExtensionWebTierPolicyApp

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb

Overview

WebTier Policy

Constant Summary collapse

WEB_TIER_POLICY_AZ_CONTROL_ENUM =
[
  WEB_TIER_POLICY_AZ_CONTROL_SERVER = 'server'.freeze,
  WEB_TIER_POLICY_AZ_CONTROL_LOCAL = 'local'.freeze,
  WEB_TIER_POLICY_AZ_CONTROL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AppExtensionWebTierPolicyApp

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 92

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.web_tier_policy_json = attributes[:'webTierPolicyJson'] if attributes[:'webTierPolicyJson']

  raise 'You cannot provide both :webTierPolicyJson and :web_tier_policy_json' if attributes.key?(:'webTierPolicyJson') && attributes.key?(:'web_tier_policy_json')

  self.web_tier_policy_json = attributes[:'web_tier_policy_json'] if attributes[:'web_tier_policy_json']

  self.web_tier_policy_az_control = attributes[:'webTierPolicyAZControl'] if attributes[:'webTierPolicyAZControl']

  raise 'You cannot provide both :webTierPolicyAZControl and :web_tier_policy_az_control' if attributes.key?(:'webTierPolicyAZControl') && attributes.key?(:'web_tier_policy_az_control')

  self.web_tier_policy_az_control = attributes[:'web_tier_policy_az_control'] if attributes[:'web_tier_policy_az_control']

  self.resource_ref = attributes[:'resourceRef'] unless attributes[:'resourceRef'].nil?

  raise 'You cannot provide both :resourceRef and :resource_ref' if attributes.key?(:'resourceRef') && attributes.key?(:'resource_ref')

  self.resource_ref = attributes[:'resource_ref'] unless attributes[:'resource_ref'].nil?
end

Instance Attribute Details

#resource_refBOOLEAN

If this Attribute is true, resource ref id and resource ref name attributes will we included in wtp json response.

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


59
60
61
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 59

def resource_ref
  @resource_ref
end

#web_tier_policy_az_controlString

Webtier policy AZ Control

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


44
45
46
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 44

def web_tier_policy_az_control
  @web_tier_policy_az_control
end

#web_tier_policy_jsonString

Store the web tier policy for an application as a string in Javascript Object Notification (JSON) format.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


29
30
31
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 29

def web_tier_policy_json
  @web_tier_policy_json
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



62
63
64
65
66
67
68
69
70
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 62

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'web_tier_policy_json': :'webTierPolicyJson',
    'web_tier_policy_az_control': :'webTierPolicyAZControl',
    'resource_ref': :'resourceRef'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
81
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 73

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'web_tier_policy_json': :'String',
    'web_tier_policy_az_control': :'String',
    'resource_ref': :'BOOLEAN'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



137
138
139
140
141
142
143
144
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 137

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    web_tier_policy_json == other.web_tier_policy_json &&
    web_tier_policy_az_control == other.web_tier_policy_az_control &&
    resource_ref == other.resource_ref
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 169

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


149
150
151
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 149

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



158
159
160
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 158

def hash
  [web_tier_policy_json, web_tier_policy_az_control, resource_ref].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



202
203
204
205
206
207
208
209
210
211
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 202

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



196
197
198
# File 'lib/oci/identity_domains/models/app_extension_web_tier_policy_app.rb', line 196

def to_s
  to_hash.to_s
end