Skip to content

Commit

Permalink
Deploying from phrase/openapi@581d0ff5
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Nov 15, 2024
1 parent 16c18ed commit 0338a33
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
4 changes: 3 additions & 1 deletion docs/KeyCreateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**remove_screenshot** | **Boolean** | Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead. | [optional]
**unformatted** | **Boolean** | Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats. | [optional]
**default_translation_content** | **String** | Creates a translation in the default locale with the specified content | [optional]
**autotranslate** | **Boolean** | Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`. | [optional]
**xml_space_preserve** | **Boolean** | Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats. | [optional]
**original_file** | **String** | Original file attribute. Used in some formats, e.g. XLIFF. | [optional]
**localized_format_string** | **String** | NSStringLocalizedFormatKey attribute. Used in .stringsdict format. | [optional]
Expand All @@ -35,10 +36,11 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
data_type: number,
tags: awesome-feature,needs-proofreading,
max_characters_allowed: 140,
screenshot: [B@771047b4,
screenshot: [B@3c32105c,
remove_screenshot: null,
unformatted: null,
default_translation_content: Default translation content,
autotranslate: null,
xml_space_preserve: null,
original_file: null,
localized_format_string: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/KeyUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
data_type: number,
tags: awesome-feature,needs-proofreading,
max_characters_allowed: 140,
screenshot: [B@3bfb81be,
screenshot: [B@39a54d70,
remove_screenshot: null,
unformatted: null,
xml_space_preserve: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/ProjectCreateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
main_format: yml,
media: Python,
shares_translation_memory: true,
project_image: [B@769fbb26,
project_image: [B@4c49193a,
remove_project_image: null,
account_id: abcd1234,
point_of_contact: abcd1234,
Expand Down
2 changes: 1 addition & 1 deletion docs/ProjectUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
main_format: yml,
media: Python,
shares_translation_memory: true,
project_image: [B@129bc797,
project_image: [B@b51d862,
remove_project_image: false,
workflow: review,
machine_translation_enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/ScreenshotUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require 'Phrase'
instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
name: A screenshot name,
description: A screenshot description,
filename: [B@7cdd8582)
filename: [B@38b65eb9)
```


12 changes: 11 additions & 1 deletion lib/phrase/models/key_create_parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class KeyCreateParameters
# Creates a translation in the default locale with the specified content
attr_accessor :default_translation_content

# Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`.
attr_accessor :autotranslate

# Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
attr_accessor :xml_space_preserve

Expand Down Expand Up @@ -68,6 +71,7 @@ def self.attribute_map
:'remove_screenshot' => :'remove_screenshot',
:'unformatted' => :'unformatted',
:'default_translation_content' => :'default_translation_content',
:'autotranslate' => :'autotranslate',
:'xml_space_preserve' => :'xml_space_preserve',
:'original_file' => :'original_file',
:'localized_format_string' => :'localized_format_string',
Expand All @@ -91,6 +95,7 @@ def self.openapi_types
:'remove_screenshot' => :'Boolean',
:'unformatted' => :'Boolean',
:'default_translation_content' => :'String',
:'autotranslate' => :'Boolean',
:'xml_space_preserve' => :'Boolean',
:'original_file' => :'String',
:'localized_format_string' => :'String',
Expand Down Expand Up @@ -168,6 +173,10 @@ def initialize(attributes = {})
self.default_translation_content = attributes[:'default_translation_content']
end

if attributes.key?(:'autotranslate')
self.autotranslate = attributes[:'autotranslate']
end

if attributes.key?(:'xml_space_preserve')
self.xml_space_preserve = attributes[:'xml_space_preserve']
end
Expand Down Expand Up @@ -224,6 +233,7 @@ def ==(o)
remove_screenshot == o.remove_screenshot &&
unformatted == o.unformatted &&
default_translation_content == o.default_translation_content &&
autotranslate == o.autotranslate &&
xml_space_preserve == o.xml_space_preserve &&
original_file == o.original_file &&
localized_format_string == o.localized_format_string &&
Expand All @@ -240,7 +250,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
end

# Builds the object from hash
Expand Down
6 changes: 6 additions & 0 deletions spec/models/key_create_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
end
end

describe 'test attribute "autotranslate"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
end

describe 'test attribute "xml_space_preserve"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
Expand Down

0 comments on commit 0338a33

Please sign in to comment.