|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module ContextDev |
| 4 | + module Models |
| 5 | + # @see ContextDev::Resources::People#search |
| 6 | + class PersonSearchResponse < ContextDev::Internal::Type::BaseModel |
| 7 | + # @!attribute request_id |
| 8 | + # Unique ID of this request, also in `X-Request-Id`. Include it when contacting |
| 9 | + # support. |
| 10 | + # |
| 11 | + # @return [String] |
| 12 | + required :request_id, String |
| 13 | + |
| 14 | + # @!attribute results |
| 15 | + # Up to 10 matching people, most relevant first. |
| 16 | + # |
| 17 | + # @return [Array<ContextDev::Models::PersonSearchResponse::Result>] |
| 18 | + required :results, |
| 19 | + -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::PersonSearchResponse::Result] } |
| 20 | + |
| 21 | + # @!attribute key_metadata |
| 22 | + # Credits this request used and your remaining balance. |
| 23 | + # |
| 24 | + # @return [ContextDev::Models::PersonSearchResponse::KeyMetadata, nil] |
| 25 | + optional :key_metadata, -> { ContextDev::Models::PersonSearchResponse::KeyMetadata } |
| 26 | + |
| 27 | + # @!attribute next_cursor |
| 28 | + # Pass as cursor to fetch the next page; null when there are no more results. |
| 29 | + # |
| 30 | + # @return [String, nil] |
| 31 | + optional :next_cursor, String, nil?: true |
| 32 | + |
| 33 | + # @!method initialize(request_id:, results:, key_metadata: nil, next_cursor: nil) |
| 34 | + # Some parameter documentations has been truncated, see |
| 35 | + # {ContextDev::Models::PersonSearchResponse} for more details. |
| 36 | + # |
| 37 | + # @param request_id [String] Unique ID of this request, also in `X-Request-Id`. Include it when contacting su |
| 38 | + # |
| 39 | + # @param results [Array<ContextDev::Models::PersonSearchResponse::Result>] Up to 10 matching people, most relevant first. |
| 40 | + # |
| 41 | + # @param key_metadata [ContextDev::Models::PersonSearchResponse::KeyMetadata] Credits this request used and your remaining balance. |
| 42 | + # |
| 43 | + # @param next_cursor [String, nil] Pass as cursor to fetch the next page; null when there are no more results. |
| 44 | + |
| 45 | + class Result < ContextDev::Internal::Type::BaseModel |
| 46 | + # @!attribute description |
| 47 | + # What the person does. |
| 48 | + # |
| 49 | + # @return [String, nil] |
| 50 | + required :description, String, nil?: true |
| 51 | + |
| 52 | + # @!attribute is_founder |
| 53 | + # Whether the person is currently a founder or co-founder. |
| 54 | + # |
| 55 | + # @return [Boolean, nil] |
| 56 | + required :is_founder, ContextDev::Internal::Type::Boolean, nil?: true |
| 57 | + |
| 58 | + # @!attribute location |
| 59 | + # Where the person lives. |
| 60 | + # |
| 61 | + # @return [ContextDev::Models::PersonSearchResponse::Result::Location] |
| 62 | + required :location, -> { ContextDev::Models::PersonSearchResponse::Result::Location } |
| 63 | + |
| 64 | + # @!attribute name |
| 65 | + # Full name. |
| 66 | + # |
| 67 | + # @return [String, nil] |
| 68 | + required :name, String, nil?: true |
| 69 | + |
| 70 | + # @!attribute profiles |
| 71 | + # Public professional profile URLs. |
| 72 | + # |
| 73 | + # @return [Array<String>] |
| 74 | + required :profiles, ContextDev::Internal::Type::ArrayOf[String] |
| 75 | + |
| 76 | + # @!attribute role |
| 77 | + # The person’s current role. |
| 78 | + # |
| 79 | + # @return [ContextDev::Models::PersonSearchResponse::Result::Role] |
| 80 | + required :role, -> { ContextDev::Models::PersonSearchResponse::Result::Role } |
| 81 | + |
| 82 | + # @!attribute schools |
| 83 | + # Schools attended. |
| 84 | + # |
| 85 | + # @return [Array<String>] |
| 86 | + required :schools, ContextDev::Internal::Type::ArrayOf[String] |
| 87 | + |
| 88 | + # @!attribute skills |
| 89 | + # Professional skills. |
| 90 | + # |
| 91 | + # @return [Array<String>] |
| 92 | + required :skills, ContextDev::Internal::Type::ArrayOf[String] |
| 93 | + |
| 94 | + # @!attribute years_of_experience |
| 95 | + # Years of professional experience. |
| 96 | + # |
| 97 | + # @return [Integer, nil] |
| 98 | + required :years_of_experience, Integer, nil?: true |
| 99 | + |
| 100 | + # @!method initialize(description:, is_founder:, location:, name:, profiles:, role:, schools:, skills:, years_of_experience:) |
| 101 | + # A person matching your search; unavailable details are null or empty lists. |
| 102 | + # |
| 103 | + # @param description [String, nil] What the person does. |
| 104 | + # |
| 105 | + # @param is_founder [Boolean, nil] Whether the person is currently a founder or co-founder. |
| 106 | + # |
| 107 | + # @param location [ContextDev::Models::PersonSearchResponse::Result::Location] Where the person lives. |
| 108 | + # |
| 109 | + # @param name [String, nil] Full name. |
| 110 | + # |
| 111 | + # @param profiles [Array<String>] Public professional profile URLs. |
| 112 | + # |
| 113 | + # @param role [ContextDev::Models::PersonSearchResponse::Result::Role] The person’s current role. |
| 114 | + # |
| 115 | + # @param schools [Array<String>] Schools attended. |
| 116 | + # |
| 117 | + # @param skills [Array<String>] Professional skills. |
| 118 | + # |
| 119 | + # @param years_of_experience [Integer, nil] Years of professional experience. |
| 120 | + |
| 121 | + # @see ContextDev::Models::PersonSearchResponse::Result#location |
| 122 | + class Location < ContextDev::Internal::Type::BaseModel |
| 123 | + # @!attribute city |
| 124 | + # City. |
| 125 | + # |
| 126 | + # @return [String, nil] |
| 127 | + required :city, String, nil?: true |
| 128 | + |
| 129 | + # @!attribute country_code |
| 130 | + # Country as a two-letter code, such as US or GB. |
| 131 | + # |
| 132 | + # @return [String, nil] |
| 133 | + required :country_code, String, nil?: true |
| 134 | + |
| 135 | + # @!attribute region |
| 136 | + # State or region. |
| 137 | + # |
| 138 | + # @return [String, nil] |
| 139 | + required :region, String, nil?: true |
| 140 | + |
| 141 | + # @!method initialize(city:, country_code:, region:) |
| 142 | + # Where the person lives. |
| 143 | + # |
| 144 | + # @param city [String, nil] City. |
| 145 | + # |
| 146 | + # @param country_code [String, nil] Country as a two-letter code, such as US or GB. |
| 147 | + # |
| 148 | + # @param region [String, nil] State or region. |
| 149 | + end |
| 150 | + |
| 151 | + # @see ContextDev::Models::PersonSearchResponse::Result#role |
| 152 | + class Role < ContextDev::Internal::Type::BaseModel |
| 153 | + # @!attribute company |
| 154 | + # Current employer, when known. |
| 155 | + # |
| 156 | + # @return [ContextDev::Models::PersonSearchResponse::Result::Role::Company, nil] |
| 157 | + required :company, -> { ContextDev::Models::PersonSearchResponse::Result::Role::Company }, nil?: true |
| 158 | + |
| 159 | + # @!attribute functions |
| 160 | + # Areas of responsibility. |
| 161 | + # |
| 162 | + # @return [Array<String>] |
| 163 | + required :functions, ContextDev::Internal::Type::ArrayOf[String] |
| 164 | + |
| 165 | + # @!attribute seniority |
| 166 | + # Seniority level. |
| 167 | + # |
| 168 | + # @return [String, nil] |
| 169 | + required :seniority, String, nil?: true |
| 170 | + |
| 171 | + # @!attribute started_on |
| 172 | + # Role start date (YYYY-MM-DD). |
| 173 | + # |
| 174 | + # @return [String, nil] |
| 175 | + required :started_on, String, nil?: true |
| 176 | + |
| 177 | + # @!attribute title |
| 178 | + # Job title. |
| 179 | + # |
| 180 | + # @return [String, nil] |
| 181 | + required :title, String, nil?: true |
| 182 | + |
| 183 | + # @!method initialize(company:, functions:, seniority:, started_on:, title:) |
| 184 | + # The person’s current role. |
| 185 | + # |
| 186 | + # @param company [ContextDev::Models::PersonSearchResponse::Result::Role::Company, nil] Current employer, when known. |
| 187 | + # |
| 188 | + # @param functions [Array<String>] Areas of responsibility. |
| 189 | + # |
| 190 | + # @param seniority [String, nil] Seniority level. |
| 191 | + # |
| 192 | + # @param started_on [String, nil] Role start date (YYYY-MM-DD). |
| 193 | + # |
| 194 | + # @param title [String, nil] Job title. |
| 195 | + |
| 196 | + # @see ContextDev::Models::PersonSearchResponse::Result::Role#company |
| 197 | + class Company < ContextDev::Internal::Type::BaseModel |
| 198 | + # @!attribute domain |
| 199 | + # The company’s website domain. |
| 200 | + # |
| 201 | + # @return [String, nil] |
| 202 | + required :domain, String, nil?: true |
| 203 | + |
| 204 | + # @!attribute name |
| 205 | + # Company name. |
| 206 | + # |
| 207 | + # @return [String, nil] |
| 208 | + required :name, String, nil?: true |
| 209 | + |
| 210 | + # @!method initialize(domain:, name:) |
| 211 | + # Current employer, when known. |
| 212 | + # |
| 213 | + # @param domain [String, nil] The company’s website domain. |
| 214 | + # |
| 215 | + # @param name [String, nil] Company name. |
| 216 | + end |
| 217 | + end |
| 218 | + end |
| 219 | + |
| 220 | + # @see ContextDev::Models::PersonSearchResponse#key_metadata |
| 221 | + class KeyMetadata < ContextDev::Internal::Type::BaseModel |
| 222 | + # @!attribute credits_consumed |
| 223 | + # Credits charged for this request. |
| 224 | + # |
| 225 | + # @return [Integer] |
| 226 | + required :credits_consumed, Integer |
| 227 | + |
| 228 | + # @!attribute credits_remaining |
| 229 | + # Credits remaining for your organization. |
| 230 | + # |
| 231 | + # @return [Integer] |
| 232 | + required :credits_remaining, Integer |
| 233 | + |
| 234 | + # @!method initialize(credits_consumed:, credits_remaining:) |
| 235 | + # Credits this request used and your remaining balance. |
| 236 | + # |
| 237 | + # @param credits_consumed [Integer] Credits charged for this request. |
| 238 | + # |
| 239 | + # @param credits_remaining [Integer] Credits remaining for your organization. |
| 240 | + end |
| 241 | + end |
| 242 | + end |
| 243 | +end |
0 commit comments