Class: Google::Apis::DocsV1::DocumentStyle

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb

Overview

The style of the document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DocumentStyle

Returns a new instance of DocumentStyle.



1436
1437
1438
# File 'lib/google/apis/docs_v1/classes.rb', line 1436

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backgroundGoogle::Apis::DocsV1::Background

Represents the background of a document. Corresponds to the JSON property background



1304
1305
1306
# File 'lib/google/apis/docs_v1/classes.rb', line 1304

def background
  @background
end

The ID of the default footer. If not set, there's no default footer. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property defaultFooterId

Returns:

  • (String)


1311
1312
1313
# File 'lib/google/apis/docs_v1/classes.rb', line 1311

def default_footer_id
  @default_footer_id
end

#default_header_idString

The ID of the default header. If not set, there's no default header. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property defaultHeaderId

Returns:

  • (String)


1318
1319
1320
# File 'lib/google/apis/docs_v1/classes.rb', line 1318

def default_header_id
  @default_header_id
end

#document_formatGoogle::Apis::DocsV1::DocumentFormat

Represents document-level format settings. Corresponds to the JSON property documentFormat



1323
1324
1325
# File 'lib/google/apis/docs_v1/classes.rb', line 1323

def document_format
  @document_format
end

The ID of the footer used only for even pages. The value of use_even_page_header_footer determines whether to use the default_footer_id or this value for the footer on even pages. If not set, there's no even page footer. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property evenPageFooterId

Returns:

  • (String)


1332
1333
1334
# File 'lib/google/apis/docs_v1/classes.rb', line 1332

def even_page_footer_id
  @even_page_footer_id
end

#even_page_header_idString

The ID of the header used only for even pages. The value of use_even_page_header_footer determines whether to use the default_header_id or this value for the header on even pages. If not set, there's no even page header. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property evenPageHeaderId

Returns:

  • (String)


1341
1342
1343
# File 'lib/google/apis/docs_v1/classes.rb', line 1341

def even_page_header_id
  @even_page_header_id
end

The ID of the footer used only for the first page. If not set then a unique footer for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_footer_id or this value for the footer on the first page. If not set, there's no first page footer. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property firstPageFooterId

Returns:

  • (String)


1351
1352
1353
# File 'lib/google/apis/docs_v1/classes.rb', line 1351

def first_page_footer_id
  @first_page_footer_id
end

#first_page_header_idString

The ID of the header used only for the first page. If not set then a unique header for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_header_id or this value for the header on the first page. If not set, there's no first page header. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property firstPageHeaderId

Returns:

  • (String)


1361
1362
1363
# File 'lib/google/apis/docs_v1/classes.rb', line 1361

def first_page_header_id
  @first_page_header_id
end

#flip_page_orientationBoolean Also known as: flip_page_orientation?

Optional. Indicates whether to flip the dimensions of the page_size, which allows changing the page orientation between portrait and landscape. If DocumentMode is PAGELESS, this property will not be rendered. Corresponds to the JSON property flipPageOrientation

Returns:

  • (Boolean)


1368
1369
1370
# File 'lib/google/apis/docs_v1/classes.rb', line 1368

def flip_page_orientation
  @flip_page_orientation
end

#margin_bottomGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginBottom



1374
1375
1376
# File 'lib/google/apis/docs_v1/classes.rb', line 1374

def margin_bottom
  @margin_bottom
end

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginFooter



1379
1380
1381
# File 'lib/google/apis/docs_v1/classes.rb', line 1379

def margin_footer
  @margin_footer
end

#margin_headerGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginHeader



1384
1385
1386
# File 'lib/google/apis/docs_v1/classes.rb', line 1384

def margin_header
  @margin_header
end

#margin_leftGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginLeft



1389
1390
1391
# File 'lib/google/apis/docs_v1/classes.rb', line 1389

def margin_left
  @margin_left
end

#margin_rightGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginRight



1394
1395
1396
# File 'lib/google/apis/docs_v1/classes.rb', line 1394

def margin_right
  @margin_right
end

#margin_topGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property marginTop



1399
1400
1401
# File 'lib/google/apis/docs_v1/classes.rb', line 1399

def margin_top
  @margin_top
end

#page_number_startFixnum

The page number from which to start counting the number of pages. If DocumentMode is PAGELESS, this property will not be rendered. Corresponds to the JSON property pageNumberStart

Returns:

  • (Fixnum)


1405
1406
1407
# File 'lib/google/apis/docs_v1/classes.rb', line 1405

def page_number_start
  @page_number_start
end

#page_sizeGoogle::Apis::DocsV1::Size

A width and height. Corresponds to the JSON property pageSize



1410
1411
1412
# File 'lib/google/apis/docs_v1/classes.rb', line 1410

def page_size
  @page_size
end

Indicates whether DocumentStyle margin_header, SectionStyle margin_header and DocumentStyle margin_footer, SectionStyle margin_footer are respected. When false, the default values in the Docs editor for header and footer margin is used. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. Corresponds to the JSON property useCustomHeaderFooterMargins

Returns:

  • (Boolean)


1419
1420
1421
# File 'lib/google/apis/docs_v1/classes.rb', line 1419

def use_custom_header_footer_margins
  @use_custom_header_footer_margins
end

Indicates whether to use the even page header / footer IDs for the even pages. If DocumentMode is PAGELESS, this property will not be rendered. Corresponds to the JSON property useEvenPageHeaderFooter

Returns:

  • (Boolean)


1426
1427
1428
# File 'lib/google/apis/docs_v1/classes.rb', line 1426

def use_even_page_header_footer
  @use_even_page_header_footer
end

Indicates whether to use the first page header / footer IDs for the first page. If DocumentMode is PAGELESS, this property will not be rendered. Corresponds to the JSON property useFirstPageHeaderFooter

Returns:

  • (Boolean)


1433
1434
1435
# File 'lib/google/apis/docs_v1/classes.rb', line 1433

def use_first_page_header_footer
  @use_first_page_header_footer
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
# File 'lib/google/apis/docs_v1/classes.rb', line 1441

def update!(**args)
  @background = args[:background] if args.key?(:background)
  @default_footer_id = args[:default_footer_id] if args.key?(:default_footer_id)
  @default_header_id = args[:default_header_id] if args.key?(:default_header_id)
  @document_format = args[:document_format] if args.key?(:document_format)
  @even_page_footer_id = args[:even_page_footer_id] if args.key?(:even_page_footer_id)
  @even_page_header_id = args[:even_page_header_id] if args.key?(:even_page_header_id)
  @first_page_footer_id = args[:first_page_footer_id] if args.key?(:first_page_footer_id)
  @first_page_header_id = args[:first_page_header_id] if args.key?(:first_page_header_id)
  @flip_page_orientation = args[:flip_page_orientation] if args.key?(:flip_page_orientation)
  @margin_bottom = args[:margin_bottom] if args.key?(:margin_bottom)
  @margin_footer = args[:margin_footer] if args.key?(:margin_footer)
  @margin_header = args[:margin_header] if args.key?(:margin_header)
  @margin_left = args[:margin_left] if args.key?(:margin_left)
  @margin_right = args[:margin_right] if args.key?(:margin_right)
  @margin_top = args[:margin_top] if args.key?(:margin_top)
  @page_number_start = args[:page_number_start] if args.key?(:page_number_start)
  @page_size = args[:page_size] if args.key?(:page_size)
  @use_custom_header_footer_margins = args[:use_custom_header_footer_margins] if args.key?(:use_custom_header_footer_margins)
  @use_even_page_header_footer = args[:use_even_page_header_footer] if args.key?(:use_even_page_header_footer)
  @use_first_page_header_footer = args[:use_first_page_header_footer] if args.key?(:use_first_page_header_footer)
end