Class: Sink::Resources::Names

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/names.rb,
lib/sink/resources/names/params.rb,
lib/sink/resources/names/documents.rb,
lib/sink/resources/names/reserved_names.rb,
lib/sink/resources/names/openapi_specials.rb,
lib/sink/resources/names/can_cause_clashes.rb,
lib/sink/resources/names/reserved_names/import.rb,
lib/sink/resources/names/reserved_names/public.rb,
lib/sink/resources/names/reserved_names/methods.rb,
lib/sink/resources/names/can_cause_clashes/response.rb,
lib/sink/resources/names/reserved_names/public/class_.rb,
lib/sink/resources/names/reserved_names/public/private.rb,
lib/sink/resources/names/reserved_names/public/interface.rb,
lib/sink/resources/names/can_cause_clashes/employment_data.rb

Defined Under Namespace

Classes: CanCauseClashes, Documents, OpenAPISpecials, Params, ReservedNames

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Names

Returns a new instance of Names.

Parameters:


22
23
24
25
26
27
28
29
# File 'lib/sink/resources/names.rb', line 22

def initialize(client:)
  @client = client
  @documents = Sink::Resources::Names::Documents.new(client: client)
  @reserved_names = Sink::Resources::Names::ReservedNames.new(client: client)
  @params = Sink::Resources::Names::Params.new(client: client)
  @can_cause_clashes = Sink::Resources::Names::CanCauseClashes.new(client: client)
  @openapi_specials = Sink::Resources::Names::OpenAPISpecials.new(client: client)
end

Instance Attribute Details

#can_cause_clashesSink::Resources::Names::CanCauseClashes (readonly)


16
17
18
# File 'lib/sink/resources/names.rb', line 16

def can_cause_clashes
  @can_cause_clashes
end

#documentsSink::Resources::Names::Documents (readonly)


7
8
9
# File 'lib/sink/resources/names.rb', line 7

def documents
  @documents
end

#openapi_specialsSink::Resources::Names::OpenAPISpecials (readonly)


19
20
21
# File 'lib/sink/resources/names.rb', line 19

def openapi_specials
  @openapi_specials
end

#paramsSink::Resources::Names::Params (readonly)


13
14
15
# File 'lib/sink/resources/names.rb', line 13

def params
  @params
end

#reserved_namesSink::Resources::Names::ReservedNames (readonly)


10
11
12
# File 'lib/sink/resources/names.rb', line 10

def reserved_names
  @reserved_names
end

Instance Method Details

#child_prop_import_clash(opts = {}) ⇒ Sink::Models::NameChildPropImportClashResponse

Endpoint with request & response properties that could cause clashes due to

imports.

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


37
38
39
40
41
42
43
44
# File 'lib/sink/resources/names.rb', line 37

def child_prop_import_clash(opts = {})
  req = {
    method: :post,
    path: "/names/child_prop_import_clash",
    model: Sink::Models::NameChildPropImportClashResponse
  }
  @client.request(req, opts)
end

#get(opts = {}) ⇒ Sink::Models::BasicSharedModelObject

Endpoint with the name ‘get` in the config.

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


51
52
53
54
55
56
57
58
# File 'lib/sink/resources/names.rb', line 51

def get(opts = {})
  req = {
    method: :get,
    path: "/names/method_name_get",
    model: Sink::Models::BasicSharedModelObject
  }
  @client.request(req, opts)
end

#properties_common_conflicts(params = {}, opts = {}) ⇒ Sink::Models::NamePropertiesCommonConflictsResponse

Endpoint with request & response properties that are likely to cause name

conflicts.

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [String] :_1_digit_leading_underscore In certain languages the leading underscore in combination with this property

    name may cause issues
    

    @option params [String] :_leading_underscore In certain languages the leading underscore in this property name may cause

    issues
    

    @option params [String] :_leading_underscore_mixed_case In certain languages the leading underscore in this property name may cause

    issues alongside a case change
    

    @option params [Boolean] :bool @option params [Boolean] :bool_2 In certain languages the type declaration for this prop can shadow the ‘bool`

    property declaration.
    

    @option params [Date] :date This shadows the stdlib ‘datetime.date` type in Python & causes type errors. @option params [Date] :date_2 In certain languages the type declaration for this prop can shadow the `date`

    property declaration.
    

    @option params [Float] :float @option params [Float] :float_2 In certain languages the type declaration for this prop can shadow the ‘float`

    property declaration.
    

    @option params [Integer] :int @option params [Integer] :int_2 In certain languages the type declaration for this prop can shadow the ‘int`

    property declaration.
    
  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


86
87
88
89
90
91
92
93
94
95
# File 'lib/sink/resources/names.rb', line 86

def properties_common_conflicts(params = {}, opts = {})
  req = {
    method: :post,
    path: "/names/properties_common_conflicts",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::NamePropertiesCommonConflictsResponse
  }
  @client.request(req, opts)
end

#properties_illegal_go_identifiers(type, params = {}, opts = {}) ⇒ Sink::Models::NamePropertiesIllegalGoIdentifiersResponse

Endpoint with request & response properties with names that aren’t legal go

identifiers.

Parameters:

  • type (String)

    illegal go identifier type

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [String, nil] :defer

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


108
109
110
111
112
113
114
115
116
117
# File 'lib/sink/resources/names.rb', line 108

def properties_illegal_go_identifiers(type, params = {}, opts = {})
  req = {
    method: :post,
    path: "/names/properties_illegal_go_identifiers/#{type}",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::NamePropertiesIllegalGoIdentifiersResponse
  }
  @client.request(req, opts)
end

#properties_illegal_javascript_identifiers(params = {}, opts = {}) ⇒ Float, Sink::Models::NamePropertiesIllegalJavascriptIdentifiersResponse::UnnamedTypeWithunionParent3

Endpoint with request & response properties with names that aren’t legal

javascript identifiers.

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [Float, nil] :irrelevant @option params [Float] :body

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:

  • (Float, Sink::Models::NamePropertiesIllegalJavascriptIdentifiersResponse::UnnamedTypeWithunionParent3)

129
130
131
132
133
134
135
136
137
138
# File 'lib/sink/resources/names.rb', line 129

def properties_illegal_javascript_identifiers(params = {}, opts = {})
  req = {
    method: :post,
    path: "/names/properties_illegal_javascript_identifiers",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: Sink::Unknown
  }
  @client.request(req, opts)
end

#response_property_clashes_model_import(opts = {}) ⇒ Sink::Models::NameResponsePropertyClashesModelImportResponse

Endpoint with a response model property that can cause clashes with a model

import.

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


146
147
148
149
150
151
152
153
# File 'lib/sink/resources/names.rb', line 146

def response_property_clashes_model_import(opts = {})
  req = {
    method: :get,
    path: "/names/response_property_clashes_model_import",
    model: Sink::Models::NameResponsePropertyClashesModelImportResponse
  }
  @client.request(req, opts)
end

#response_shadows_pydantic(opts = {}) ⇒ Sink::Models::NameResponseShadowsPydanticResponse

Endpoint with a response model property that would clash with pydantic.

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:


160
161
162
163
164
165
166
167
# File 'lib/sink/resources/names.rb', line 160

def response_shadows_pydantic(opts = {})
  req = {
    method: :get,
    path: "/names/response_property_shadows_pydantic",
    model: Sink::Models::NameResponseShadowsPydanticResponse
  }
  @client.request(req, opts)
end