Class: HubSpotSDK::Models::Cms::URLMappingCreateRequestBody

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

Direct Known Subclasses

URLRedirectCreateParams

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(destination:, redirect_style:, route_prefix:, is_match_full_url: nil, is_match_query_string: nil, is_only_after_not_found: nil, is_pattern: nil, is_protocol_agnostic: nil, is_trailing_slash_optional: nil, precedence: nil) ⇒ Object

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

Parameters:

  • destination (String)

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

  • 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.

  • is_match_full_url (Boolean) (defaults to: nil)

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

  • is_match_query_string (Boolean) (defaults to: nil)

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

  • is_only_after_not_found (Boolean) (defaults to: nil)

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

  • is_pattern (Boolean) (defaults to: nil)

    Whether the ‘routePrefix` should match based on pattern.

  • is_protocol_agnostic (Boolean) (defaults to: nil)

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

  • is_trailing_slash_optional (Boolean) (defaults to: nil)

    Whether a trailing slash will be ignored.

  • precedence (Integer) (defaults to: nil)

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



# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 76

Instance Attribute Details

#destinationString

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

Returns:

  • (String)


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

required :destination, String

#is_match_full_urlBoolean?

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

Returns:

  • (Boolean, nil)


32
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 32

optional :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, nil)


39
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 39

optional :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, nil)


47
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 47

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

#is_patternBoolean?

Whether the ‘routePrefix` should match based on pattern.

Returns:

  • (Boolean, nil)


53
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 53

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

#is_protocol_agnosticBoolean?

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

Returns:

  • (Boolean, nil)


59
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 59

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

#is_trailing_slash_optionalBoolean?

Whether a trailing slash will be ignored.

Returns:

  • (Boolean, nil)


65
66
67
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 65

optional :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, nil)


74
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 74

optional :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)


20
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 20

required :redirect_style, Integer, api_name: :redirectStyle

#route_prefixString

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

Returns:

  • (String)


26
# File 'lib/hubspot_sdk/models/cms/url_mapping_create_request_body.rb', line 26

required :route_prefix, String, api_name: :routePrefix