aws-sdk-s3 1.0.0.rc2 → 1.0.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,128 +1,126 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module S3
10
- class BucketRequestPayment
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(bucket_name, options = {})
15
- # @param [String] bucket_name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :bucket_name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @bucket_name = extract_bucket_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::S3
9
+ class BucketRequestPayment
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(bucket_name, options = {})
14
+ # @param [String] bucket_name
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :bucket_name
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @bucket_name = extract_bucket_name(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def bucket_name
31
- @bucket_name
32
- end
28
+ # @return [String]
29
+ def bucket_name
30
+ @bucket_name
31
+ end
33
32
 
34
- # Specifies who pays for the download and request fees.
35
- # @return [String]
36
- def payer
37
- data.payer
38
- end
33
+ # Specifies who pays for the download and request fees.
34
+ # @return [String]
35
+ def payer
36
+ data.payer
37
+ end
39
38
 
40
- # @!endgroup
39
+ # @!endgroup
41
40
 
42
- # @return [Client]
43
- def client
44
- @client
45
- end
41
+ # @return [Client]
42
+ def client
43
+ @client
44
+ end
46
45
 
47
- # Loads, or reloads {#data} for the current {BucketRequestPayment}.
48
- # Returns `self` making it possible to chain methods.
49
- #
50
- # bucket_request_payment.reload.data
51
- #
52
- # @return [self]
53
- def load
54
- resp = @client.get_bucket_request_payment(bucket: @bucket_name)
55
- @data = resp.data
56
- self
57
- end
58
- alias :reload :load
59
-
60
- # @return [Types::GetBucketRequestPaymentOutput]
61
- # Returns the data for this {BucketRequestPayment}. Calls
62
- # {Client#get_bucket_request_payment} if {#data_loaded?} is `false`.
63
- def data
64
- load unless @data
65
- @data
66
- end
46
+ # Loads, or reloads {#data} for the current {BucketRequestPayment}.
47
+ # Returns `self` making it possible to chain methods.
48
+ #
49
+ # bucket_request_payment.reload.data
50
+ #
51
+ # @return [self]
52
+ def load
53
+ resp = @client.get_bucket_request_payment(bucket: @bucket_name)
54
+ @data = resp.data
55
+ self
56
+ end
57
+ alias :reload :load
58
+
59
+ # @return [Types::GetBucketRequestPaymentOutput]
60
+ # Returns the data for this {BucketRequestPayment}. Calls
61
+ # {Client#get_bucket_request_payment} if {#data_loaded?} is `false`.
62
+ def data
63
+ load unless @data
64
+ @data
65
+ end
67
66
 
68
- # @return [Boolean]
69
- # Returns `true` if this resource is loaded. Accessing attributes or
70
- # {#data} on an unloaded resource will trigger a call to {#load}.
71
- def data_loaded?
72
- !!@data
73
- end
67
+ # @return [Boolean]
68
+ # Returns `true` if this resource is loaded. Accessing attributes or
69
+ # {#data} on an unloaded resource will trigger a call to {#load}.
70
+ def data_loaded?
71
+ !!@data
72
+ end
74
73
 
75
- # @!group Actions
76
-
77
- # @example Request syntax with placeholder values
78
- #
79
- # bucket_request_payment.put({
80
- # content_md5: "ContentMD5",
81
- # request_payment_configuration: { # required
82
- # payer: "Requester", # required, accepts Requester, BucketOwner
83
- # },
84
- # })
85
- # @param [Hash] options ({})
86
- # @option options [String] :content_md5
87
- # @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
88
- # @return [EmptyStructure]
89
- def put(options = {})
90
- options = options.merge(bucket: @bucket_name)
91
- resp = @client.put_bucket_request_payment(options)
92
- resp.data
93
- end
74
+ # @!group Actions
75
+
76
+ # @example Request syntax with placeholder values
77
+ #
78
+ # bucket_request_payment.put({
79
+ # content_md5: "ContentMD5",
80
+ # request_payment_configuration: { # required
81
+ # payer: "Requester", # required, accepts Requester, BucketOwner
82
+ # },
83
+ # })
84
+ # @param [Hash] options ({})
85
+ # @option options [String] :content_md5
86
+ # @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
87
+ # @return [EmptyStructure]
88
+ def put(options = {})
89
+ options = options.merge(bucket: @bucket_name)
90
+ resp = @client.put_bucket_request_payment(options)
91
+ resp.data
92
+ end
94
93
 
95
- # @!group Associations
94
+ # @!group Associations
96
95
 
97
- # @return [Bucket]
98
- def bucket
99
- Bucket.new(
100
- name: @bucket_name,
101
- client: @client
102
- )
103
- end
96
+ # @return [Bucket]
97
+ def bucket
98
+ Bucket.new(
99
+ name: @bucket_name,
100
+ client: @client
101
+ )
102
+ end
104
103
 
105
- # @deprecated
106
- # @api private
107
- def identifiers
108
- { bucket_name: @bucket_name }
109
- end
110
- deprecated(:identifiers)
111
-
112
- private
113
-
114
- def extract_bucket_name(args, options)
115
- value = args[0] || options.delete(:bucket_name)
116
- case value
117
- when String then value
118
- when nil then raise ArgumentError, "missing required option :bucket_name"
119
- else
120
- msg = "expected :bucket_name to be a String, got #{value.class}"
121
- raise ArgumentError, msg
122
- end
104
+ # @deprecated
105
+ # @api private
106
+ def identifiers
107
+ { bucket_name: @bucket_name }
108
+ end
109
+ deprecated(:identifiers)
110
+
111
+ private
112
+
113
+ def extract_bucket_name(args, options)
114
+ value = args[0] || options.delete(:bucket_name)
115
+ case value
116
+ when String then value
117
+ when nil then raise ArgumentError, "missing required option :bucket_name"
118
+ else
119
+ msg = "expected :bucket_name to be a String, got #{value.class}"
120
+ raise ArgumentError, msg
123
121
  end
124
-
125
- class Collection < Aws::Resources::Collection; end
126
122
  end
123
+
124
+ class Collection < Aws::Resources::Collection; end
127
125
  end
128
126
  end
@@ -1,143 +1,141 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module S3
10
- class BucketTagging
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(bucket_name, options = {})
15
- # @param [String] bucket_name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :bucket_name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @bucket_name = extract_bucket_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::S3
9
+ class BucketTagging
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(bucket_name, options = {})
14
+ # @param [String] bucket_name
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :bucket_name
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @bucket_name = extract_bucket_name(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def bucket_name
31
- @bucket_name
32
- end
28
+ # @return [String]
29
+ def bucket_name
30
+ @bucket_name
31
+ end
33
32
 
34
- # @return [Array<Types::Tag>]
35
- def tag_set
36
- data.tag_set
37
- end
33
+ # @return [Array<Types::Tag>]
34
+ def tag_set
35
+ data.tag_set
36
+ end
38
37
 
39
- # @!endgroup
38
+ # @!endgroup
40
39
 
41
- # @return [Client]
42
- def client
43
- @client
44
- end
40
+ # @return [Client]
41
+ def client
42
+ @client
43
+ end
45
44
 
46
- # Loads, or reloads {#data} for the current {BucketTagging}.
47
- # Returns `self` making it possible to chain methods.
48
- #
49
- # bucket_tagging.reload.data
50
- #
51
- # @return [self]
52
- def load
53
- resp = @client.get_bucket_tagging(bucket: @bucket_name)
54
- @data = resp.data
55
- self
56
- end
57
- alias :reload :load
58
-
59
- # @return [Types::GetBucketTaggingOutput]
60
- # Returns the data for this {BucketTagging}. Calls
61
- # {Client#get_bucket_tagging} if {#data_loaded?} is `false`.
62
- def data
63
- load unless @data
64
- @data
65
- end
45
+ # Loads, or reloads {#data} for the current {BucketTagging}.
46
+ # Returns `self` making it possible to chain methods.
47
+ #
48
+ # bucket_tagging.reload.data
49
+ #
50
+ # @return [self]
51
+ def load
52
+ resp = @client.get_bucket_tagging(bucket: @bucket_name)
53
+ @data = resp.data
54
+ self
55
+ end
56
+ alias :reload :load
57
+
58
+ # @return [Types::GetBucketTaggingOutput]
59
+ # Returns the data for this {BucketTagging}. Calls
60
+ # {Client#get_bucket_tagging} if {#data_loaded?} is `false`.
61
+ def data
62
+ load unless @data
63
+ @data
64
+ end
66
65
 
67
- # @return [Boolean]
68
- # Returns `true` if this resource is loaded. Accessing attributes or
69
- # {#data} on an unloaded resource will trigger a call to {#load}.
70
- def data_loaded?
71
- !!@data
72
- end
66
+ # @return [Boolean]
67
+ # Returns `true` if this resource is loaded. Accessing attributes or
68
+ # {#data} on an unloaded resource will trigger a call to {#load}.
69
+ def data_loaded?
70
+ !!@data
71
+ end
73
72
 
74
- # @!group Actions
75
-
76
- # @example Request syntax with placeholder values
77
- #
78
- # bucket_tagging.delete()
79
- # @param [Hash] options ({})
80
- # @return [EmptyStructure]
81
- def delete(options = {})
82
- options = options.merge(bucket: @bucket_name)
83
- resp = @client.delete_bucket_tagging(options)
84
- resp.data
85
- end
73
+ # @!group Actions
74
+
75
+ # @example Request syntax with placeholder values
76
+ #
77
+ # bucket_tagging.delete()
78
+ # @param [Hash] options ({})
79
+ # @return [EmptyStructure]
80
+ def delete(options = {})
81
+ options = options.merge(bucket: @bucket_name)
82
+ resp = @client.delete_bucket_tagging(options)
83
+ resp.data
84
+ end
86
85
 
87
- # @example Request syntax with placeholder values
88
- #
89
- # bucket_tagging.put({
90
- # content_md5: "ContentMD5",
91
- # tagging: { # required
92
- # tag_set: [ # required
93
- # {
94
- # key: "ObjectKey", # required
95
- # value: "Value", # required
96
- # },
97
- # ],
98
- # },
99
- # })
100
- # @param [Hash] options ({})
101
- # @option options [String] :content_md5
102
- # @option options [required, Types::Tagging] :tagging
103
- # @return [EmptyStructure]
104
- def put(options = {})
105
- options = options.merge(bucket: @bucket_name)
106
- resp = @client.put_bucket_tagging(options)
107
- resp.data
108
- end
86
+ # @example Request syntax with placeholder values
87
+ #
88
+ # bucket_tagging.put({
89
+ # content_md5: "ContentMD5",
90
+ # tagging: { # required
91
+ # tag_set: [ # required
92
+ # {
93
+ # key: "ObjectKey", # required
94
+ # value: "Value", # required
95
+ # },
96
+ # ],
97
+ # },
98
+ # })
99
+ # @param [Hash] options ({})
100
+ # @option options [String] :content_md5
101
+ # @option options [required, Types::Tagging] :tagging
102
+ # @return [EmptyStructure]
103
+ def put(options = {})
104
+ options = options.merge(bucket: @bucket_name)
105
+ resp = @client.put_bucket_tagging(options)
106
+ resp.data
107
+ end
109
108
 
110
- # @!group Associations
109
+ # @!group Associations
111
110
 
112
- # @return [Bucket]
113
- def bucket
114
- Bucket.new(
115
- name: @bucket_name,
116
- client: @client
117
- )
118
- end
111
+ # @return [Bucket]
112
+ def bucket
113
+ Bucket.new(
114
+ name: @bucket_name,
115
+ client: @client
116
+ )
117
+ end
119
118
 
120
- # @deprecated
121
- # @api private
122
- def identifiers
123
- { bucket_name: @bucket_name }
124
- end
125
- deprecated(:identifiers)
126
-
127
- private
128
-
129
- def extract_bucket_name(args, options)
130
- value = args[0] || options.delete(:bucket_name)
131
- case value
132
- when String then value
133
- when nil then raise ArgumentError, "missing required option :bucket_name"
134
- else
135
- msg = "expected :bucket_name to be a String, got #{value.class}"
136
- raise ArgumentError, msg
137
- end
119
+ # @deprecated
120
+ # @api private
121
+ def identifiers
122
+ { bucket_name: @bucket_name }
123
+ end
124
+ deprecated(:identifiers)
125
+
126
+ private
127
+
128
+ def extract_bucket_name(args, options)
129
+ value = args[0] || options.delete(:bucket_name)
130
+ case value
131
+ when String then value
132
+ when nil then raise ArgumentError, "missing required option :bucket_name"
133
+ else
134
+ msg = "expected :bucket_name to be a String, got #{value.class}"
135
+ raise ArgumentError, msg
138
136
  end
139
-
140
- class Collection < Aws::Resources::Collection; end
141
137
  end
138
+
139
+ class Collection < Aws::Resources::Collection; end
142
140
  end
143
141
  end