Class: OCI::IdentityDomains::Models::OAuth2ClientCredentialSearchRequest

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

Overview

Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the .search path extension. The inclusion of .search on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in .search). The body of the POST request MAY include any of the parameters.

Constant Summary collapse

ATTRIBUTE_SETS_ENUM =
[
  ATTRIBUTE_SETS_ALL = 'all'.freeze,
  ATTRIBUTE_SETS_ALWAYS = 'always'.freeze,
  ATTRIBUTE_SETS_NEVER = 'never'.freeze,
  ATTRIBUTE_SETS_REQUEST = 'request'.freeze,
  ATTRIBUTE_SETS_DEFAULT = 'default'.freeze
].freeze
SORT_ORDER_ENUM =
[
  SORT_ORDER_ASCENDING = 'ASCENDING'.freeze,
  SORT_ORDER_DESCENDING = 'DESCENDING'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OAuth2ClientCredentialSearchRequest

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :schemas (Array<String>)

    The value to assign to the #schemas property

  • :attributes (Array<String>)

    The value to assign to the #attributes property

  • :attribute_sets (Array<String>)

    The value to assign to the #attribute_sets property

  • :filter (String)

    The value to assign to the #filter property

  • :sort_by (String)

    The value to assign to the #sort_by property

  • :sort_order (String)

    The value to assign to the #sort_order property

  • :start_index (Integer)

    The value to assign to the #start_index property

  • :count (Integer)

    The value to assign to the #count property



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
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 102

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.schemas = attributes[:'schemas'] if attributes[:'schemas']

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

  self.attribute_sets = attributes[:'attributeSets'] if attributes[:'attributeSets']

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

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

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

  self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy']

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

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

  self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder']

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

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

  self.start_index = attributes[:'startIndex'] if attributes[:'startIndex']

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

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

  self.count = attributes[:'count'] if attributes[:'count']
end

Instance Attribute Details

#attribute_setsArray<String>

A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL.

Returns:

  • (Array<String>)


34
35
36
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 34

def attribute_sets
  @attribute_sets
end

#attributesArray<String>

A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10) form. See (additional retrieval query parameters). OPTIONAL.

Returns:

  • (Array<String>)


30
31
32
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 30

def attributes
  @attributes
end

#countInteger

An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). OPTIONAL.

Returns:

  • (Integer)


54
55
56
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 54

def count
  @count
end

#filterString

The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2. OPTIONAL.

Returns:

  • (String)


38
39
40
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 38

def filter
  @filter
end

#schemasArray<String>

[Required] The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED.

Returns:

  • (Array<String>)


26
27
28
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 26

def schemas
  @schemas
end

#sort_byString

A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10) form. See Sorting section. OPTIONAL.

Returns:

  • (String)


42
43
44
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 42

def sort_by
  @sort_by
end

#sort_orderString

A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section). OPTIONAL.

Returns:

  • (String)


46
47
48
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 46

def sort_order
  @sort_order
end

#start_indexInteger

An integer that indicates the 1-based index of the first query result. See Pagination Section. OPTIONAL.

Returns:

  • (Integer)


50
51
52
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 50

def start_index
  @start_index
end

Class Method Details

.attribute_mapObject

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



57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 57

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'schemas': :'schemas',
    'attributes': :'attributes',
    'attribute_sets': :'attributeSets',
    'filter': :'filter',
    'sort_by': :'sortBy',
    'sort_order': :'sortOrder',
    'start_index': :'startIndex',
    'count': :'count'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 73

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'schemas': :'Array<String>',
    'attributes': :'Array<String>',
    'attribute_sets': :'Array<String>',
    'filter': :'String',
    'sort_by': :'String',
    'sort_order': :'String',
    'start_index': :'Integer',
    'count': :'Integer'
    # 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



171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 171

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

  self.class == other.class &&
    schemas == other.schemas &&
    attributes == other.attributes &&
    attribute_sets == other.attribute_sets &&
    filter == other.filter &&
    sort_by == other.sort_by &&
    sort_order == other.sort_order &&
    start_index == other.start_index &&
    count == other.count
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



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 208

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


188
189
190
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 188

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



197
198
199
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 197

def hash
  [schemas, attributes, attribute_sets, filter, sort_by, sort_order, start_index, count].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 241

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



235
236
237
# File 'lib/oci/identity_domains/models/o_auth2_client_credential_search_request.rb', line 235

def to_s
  to_hash.to_s
end