1 package Arvados::ResourceProxy;
7 $self->{'resourceAccessor'} = shift;
15 $response = $self->{'resourceAccessor'}->{'update'}->execute('uuid' => $self->{'uuid'}, $self->resource_parameter_name() => $self);
16 foreach my $param (keys %$self) {
17 if (exists $response->{$param}) {
18 $self->{$param} = $response->{$param};
28 $response = $self->{'resourceAccessor'}->{'update'}->execute('uuid' => $self->{'uuid'}, $self->resource_parameter_name() => \%updates);
29 foreach my $param (keys %updates) {
30 if (exists $response->{$param}) {
31 $self->{$param} = $response->{$param};
40 $response = $self->{'resourceAccessor'}->{'get'}->execute('uuid' => $self->{'uuid'});
41 foreach my $param (keys %$self) {
42 if (exists $response->{$param}) {
43 $self->{$param} = $response->{$param};
49 sub resource_parameter_name
52 my $pname = $self->{'resourceAccessor'}->{'resourcesName'};
53 $pname =~ s/s$//; # XXX not a very good singularize()