Class: HubSpotSDK::Models::Cms::URLMapping

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/hubspot_sdk/models/cms/url_mapping.rb

Overview

Direct Known Subclasses

URLRedirectUpdateParams

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created:, destination:, is_match_full_url:, is_match_query_string:, is_only_after_not_found:, is_pattern:, is_protocol_agnostic:, is_trailing_slash_optional:, precedence:, redirect_style:, route_prefix:, updated:) ⇒ Object

Some parameter documentations has been truncated, see HubSpotSDK::Models::Cms::URLMapping for more details.

Parameters:

  • id (String)

    The unique ID of this URL redirect.

  • created (Time)

    The date and time when the URL mapping was initially created.

  • destination (String)

    The destination URL, where the target URL should be redirected if it matches the

  • is_match_full_url (Boolean)

    Whether the ‘routePrefix` should match on the entire URL, including the domain.

  • is_match_query_string (Boolean)

    Whether the ‘routePrefix` should match on the entire URL path, including the que

  • is_only_after_not_found (Boolean)

    Whether the URL redirect mapping should apply only if a live page on the URL isn

  • is_pattern (Boolean)

    Whether the ‘routePrefix` should match based on pattern.

  • is_protocol_agnostic (Boolean)

    Whether the ‘routePrefix` should match both HTTP and HTTPS protocols.

  • is_trailing_slash_optional (Boolean)

    Whether a trailing slash will be ignored.

  • precedence (Integer)

    Used to prioritize URL redirection. If a given URL matches more than one redirec

  • redirect_style (Integer)

    The type of redirect to create. Options include: 301 (permanent), 302 (temporary

  • route_prefix (String)

    The target incoming URL, path, or pattern to match for redirection.

  • updated (Time)

    The date and time when the URL mapping was last modified.



# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 95

Instance Attribute Details

#createdTime

The date and time when the URL mapping was initially created.

Returns:

  • (Time)


18
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 18

required :created, Time

#destinationString

The destination URL, where the target URL should be redirected if it matches the ‘routePrefix`.

Returns:

  • (String)


25
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 25

required :destination, String

#idString

The unique ID of this URL redirect.

Returns:

  • (String)


12
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 12

required :id, String

#is_match_full_urlBoolean

Whether the ‘routePrefix` should match on the entire URL, including the domain.

Returns:

  • (Boolean)


31
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 31

required :is_match_full_url, HubSpotSDK::Internal::Type::Boolean, api_name: :isMatchFullUrl

#is_match_query_stringBoolean

Whether the ‘routePrefix` should match on the entire URL path, including the query string.

Returns:

  • (Boolean)


38
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 38

required :is_match_query_string, HubSpotSDK::Internal::Type::Boolean, api_name: :isMatchQueryString

#is_only_after_not_foundBoolean

Whether the URL redirect mapping should apply only if a live page on the URL isn’t found. If False, the URL redirect mapping will take precedence over any existing page.

Returns:

  • (Boolean)


46
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 46

required :is_only_after_not_found, HubSpotSDK::Internal::Type::Boolean, api_name: :isOnlyAfterNotFound

#is_patternBoolean

Whether the ‘routePrefix` should match based on pattern.

Returns:

  • (Boolean)


52
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 52

required :is_pattern, HubSpotSDK::Internal::Type::Boolean, api_name: :isPattern

#is_protocol_agnosticBoolean

Whether the ‘routePrefix` should match both HTTP and HTTPS protocols.

Returns:

  • (Boolean)


58
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 58

required :is_protocol_agnostic, HubSpotSDK::Internal::Type::Boolean, api_name: :isProtocolAgnostic

#is_trailing_slash_optionalBoolean

Whether a trailing slash will be ignored.

Returns:

  • (Boolean)


64
65
66
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 64

required :is_trailing_slash_optional,
HubSpotSDK::Internal::Type::Boolean,
api_name: :isTrailingSlashOptional

#precedenceInteger

Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the lower precedence will be used.

Returns:

  • (Integer)


73
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 73

required :precedence, Integer

#redirect_styleInteger

The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy). Find more details [here](knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).

Returns:

  • (Integer)


81
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 81

required :redirect_style, Integer, api_name: :redirectStyle

#route_prefixString

The target incoming URL, path, or pattern to match for redirection.

Returns:

  • (String)


87
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 87

required :route_prefix, String, api_name: :routePrefix

#updatedTime

The date and time when the URL mapping was last modified.

Returns:

  • (Time)


93
# File 'lib/hubspot_sdk/models/cms/url_mapping.rb', line 93

required :updated, Time